From 8c32876f478030536f1b3e0d2d003eecd9159d61 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 4 May 2014 10:44:48 +0000 Subject: updated model git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14929 67ed7778-7388-44ab-90cf-0a291f65f57c --- coverity-model.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'coverity-model.c') diff --git a/coverity-model.c b/coverity-model.c index 3b6539597..6c534ea9f 100644 --- a/coverity-model.c +++ b/coverity-model.c @@ -27,3 +27,35 @@ uint64_t htod64p (PTPParams *params, uint64_t var) { __coverity_tainted_data_ret void htod64ap (PTPParams *params, unsigned char *a, uint64_t val) { __coverity_tainted_data_argument__(a); } void dtoh64ap (PTPParams *params, unsigned char *a, uint64_t val) { __coverity_tainted_data_argument__(a); } +/* gphoto port reading from devices */ +typedef void *GPPort; +int gp_port_read (GPPort *port, char *data, int size) { + __coverity_tainted_data_argument__(data); +} + +int gp_port_usb_msg_read (GPPort *port, int request, int value, int index, char *bytes, int size) { + __coverity_tainted_data_argument__(bytes); +} + +int gp_port_usb_msg_interface_read (GPPort *port, int request, int value, int index, char *bytes, int size) { + __coverity_tainted_data_argument__(bytes); +} + +int gp_port_usb_msg_class_read (GPPort *port, int request, int value, int index, char *bytes, int size) { + __coverity_tainted_data_argument__(bytes); +} + +int gp_port_send_scsi_cmd (GPPort *port, int to_dev, + char *cmd, int cmd_size, + char *sense, int sense_size, + char *data, int data_size) { + if (!to_dev) { + __coverity_tainted_data_argument__(data); + __coverity_tainted_data_argument__(sense); + } +} + +void gp_log_data (const char *domain, const char *data, unsigned int size) { + /* considered a tainted sink ... but is not one. */ +} + -- cgit v1.2.1