Skip to content

Commit

Permalink
Merge strcmp() changes from #604
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteube committed Nov 21, 2016
1 parent e43747f commit 66a9f2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/folder.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ char *first_file_in_directory (const char *path)

#endif

if ((strcmp (de->d_name, ".") == 0) || (strcmp (de->d_name, "..") == 0)) continue;
if ((strncmp (de->d_name, ".", strlen (de->d_name)) == 0) || (strncmp (de->d_name, "..", strlen (de->d_name)) == 0)) continue;

first_file = strdup (de->d_name);

Expand Down Expand Up @@ -217,7 +217,7 @@ char **scan_directory (const char *path)

#endif

if ((strcmp (de->d_name, ".") == 0) || (strcmp (de->d_name, "..") == 0)) continue;
if ((strncmp (de->d_name, ".", strlen (de->d_name)) == 0) || (strncmp (de->d_name, "..", strlen (de->d_name)) == 0)) continue;

char *path_file = (char *) hcmalloc (HCBUFSIZ_TINY);

Expand Down
2 changes: 1 addition & 1 deletion src/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -10568,7 +10568,7 @@ int sip_auth_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_U

// there are 2 possibilities for the esalt:

if ((strcmp ((const char *) qop_pos, "auth") == 0) || (strcmp ((const char *) qop_pos, "auth-int") == 0))
if ((strncmp ((const char *) qop_pos, "auth", strlen ((const char *) qop_pos)) == 0) || (strncmp ((const char *) qop_pos, "auth-int", strlen ((const char *) qop_pos)) == 0))
{
esalt_len = 1 + nonce_len + 1 + nonce_count_len + 1 + nonce_client_len + 1 + qop_len + 1 + 32;

Expand Down

0 comments on commit 66a9f2f

Please sign in to comment.