@@ -81,7 +81,8 @@ digest_matches(int fd, const char *path, const char *runchroot,
8181 file_digest = sudo_filedigest (fd , path , digest -> digest_type ,
8282 & digest_len );
8383 if (lseek (fd , (off_t )0 , SEEK_SET ) == -1 ) {
84- sudo_debug_printf (SUDO_DEBUG_ERROR |SUDO_DEBUG_ERRNO |SUDO_DEBUG_LINENO ,
84+ sudo_debug_printf (
85+ SUDO_DEBUG_ERROR |SUDO_DEBUG_ERRNO |SUDO_DEBUG_LINENO ,
8586 "unable to rewind digest fd" );
8687 }
8788 digest_type = digest -> digest_type ;
@@ -92,7 +93,8 @@ digest_matches(int fd, const char *path, const char *runchroot,
9293 }
9394
9495 /* Convert the command digest from ascii to binary. */
95- if ((sudoers_digest = malloc (digest_len )) == NULL ) {
96+ sudoers_digest = malloc (digest_len ); // -V614
97+ if (sudoers_digest == NULL ) {
9698 sudo_warnx (U_ ("%s: %s" ), __func__ , U_ ("unable to allocate memory" ));
9799 goto done ;
98100 }
@@ -107,7 +109,8 @@ digest_matches(int fd, const char *path, const char *runchroot,
107109 }
108110 } else {
109111 /* Convert base64 to binary. */
110- size_t len = base64_decode (digest -> digest_str , sudoers_digest , digest_len );
112+ size_t len = base64_decode (digest -> digest_str , sudoers_digest ,
113+ digest_len );
111114 if (len == (size_t )-1 )
112115 goto bad_format ;
113116 if (len != digest_len ) {
0 commit comments