diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-09-01 19:38:51 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-09-01 19:43:58 +0200 |
commit | d54ed53ecae23a206ff00dae57db54f935bb5741 (patch) | |
tree | 46c7aca211a8996111ef47fe6f99cc36688dec22 | |
parent | f16a9f188f7cf3f8f72f8f58156ef602b8d6ffec (diff) | |
download | libgphoto2-d54ed53ecae23a206ff00dae57db54f935bb5741.tar.gz |
zeroize saddr (coverity)
-rw-r--r-- | camlibs/ptp2/fujiptpip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/camlibs/ptp2/fujiptpip.c b/camlibs/ptp2/fujiptpip.c index 5a733d228..6203dbaa9 100644 --- a/camlibs/ptp2/fujiptpip.c +++ b/camlibs/ptp2/fujiptpip.c @@ -668,6 +668,8 @@ ptp_fujiptpip_init_event (PTPParams* params, const char *address) int port, eventport, tries; struct sockaddr_in saddr; + memset(&saddr,0,sizeof(saddr)); + GP_LOG_D ("connecting to %s.", address); if (NULL == strchr (address,':')) return GP_ERROR_BAD_PARAMETERS; @@ -882,6 +884,8 @@ ptp_fujiptpip_connect (PTPParams* params, const char *address) { struct sockaddr_in saddr; uint16_t ret; + memset(&saddr,0,sizeof(saddr)); + GP_LOG_D ("connecting to %s.", address); if (NULL == strchr (address,':')) return GP_ERROR_BAD_PARAMETERS; |