Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
access: fix access_entry_class_password_set() - coverity
  • Loading branch information
perexg committed Oct 3, 2014
1 parent fd0282f commit d3fcdf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/access.c
Expand Up @@ -893,12 +893,12 @@ access_entry_class_password_set(void *o, const void *v)
char buf[256], result[300];

if (strcmp(v ?: "", ae->ae_password ?: "")) {
snprintf(buf, sizeof(buf), "TVHeadend-Hide-%s", (const char *)v);
snprintf(buf, sizeof(buf), "TVHeadend-Hide-%s", (const char *)v ?: "");
base64_encode(result, sizeof(result), (uint8_t *)buf, strlen(buf));
free(ae->ae_password2);
ae->ae_password2 = strdup(result);
free(ae->ae_password);
ae->ae_password = strdup((const char *)v);
ae->ae_password = strdup((const char *)v ?: "");
return 1;
}
return 0;
Expand Down

0 comments on commit d3fcdf3

Please sign in to comment.