@@ -1943,7 +1943,7 @@ parse_hex_u64(const char *s, uint64_t *up)
19431943 unsigned long long ull ;
19441944
19451945 errno = 0 ;
1946- ull = strtoull (s , & ep , 16 );
1946+ ull = strtoull (s , & ep , 16 ); // CodeQL [SM02313] false positive: strtoull will initialize ep.
19471947 if (* s == '\0' || * ep != '\0' )
19481948 fatal ("Invalid certificate time: not a number" );
19491949 if (errno == ERANGE && ull == ULONG_MAX )
@@ -3211,7 +3211,7 @@ do_download_sk(const char *skprovider, const char *device)
32113211 /* Save the key with the application string as the comment */
32123212 if (pass == NULL )
32133213 pass = private_key_passphrase ();
3214- if ((r = sshkey_save_private (key , path , pass ,
3214+ if ((r = sshkey_save_private (key , path , pass , // CodeQL [SM02311] false positive: private_key_passphrase() will never return null.
32153215 key -> sk_application , private_key_format ,
32163216 openssh_format_cipher , rounds )) != 0 ) {
32173217 error_r (r , "Saving key \"%s\" failed" , path );
@@ -3932,7 +3932,7 @@ main(int argc, char **argv)
39323932 }
39333933
39343934 /* Save the key with the given passphrase and comment. */
3935- if ((r = sshkey_save_private (private , identity_file , passphrase ,
3935+ if ((r = sshkey_save_private (private , identity_file , passphrase , // CodeQL [SM02311] false positive: private_key_passphrase() will never return null.
39363936 comment , private_key_format , openssh_format_cipher , rounds )) != 0 ) {
39373937 error_r (r , "Saving key \"%s\" failed" , identity_file );
39383938 freezero (passphrase , strlen (passphrase ));
0 commit comments