Skip to content

Commit

Permalink
Fix: Prevent strcmp on NULL in CREATE_USER
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell authored and a-h-abdelsalam committed Jun 19, 2024
1 parent 13fc5c8 commit b8c0f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -53682,7 +53682,7 @@ create_user (const gchar * name, const gchar * password, const gchar *comment,
if (allowed_methods && (allowed_methods->len > 2))
return -3;

if (allowed_methods && (allowed_methods->len == 0))
if (allowed_methods && (allowed_methods->len <= 1))
allowed_methods = NULL;

if (allowed_methods
Expand Down

0 comments on commit b8c0f10

Please sign in to comment.