access: coverity - handle negative value from base64_decode()
This commit is contained in:
parent
cb2e79788c
commit
a97c73d96e
1 changed files with 2 additions and 0 deletions
|
@ -914,6 +914,8 @@ access_entry_class_password2_set(void *o, const void *v)
|
|||
if (strcmp(v ?: "", ae->ae_password2 ?: "")) {
|
||||
if (v && ((const char *)v)[0] != '\0') {
|
||||
l = base64_decode((uint8_t *)result, v, sizeof(result)-1);
|
||||
if (l < 0)
|
||||
l = 0;
|
||||
result[l] = '\0';
|
||||
free(ae->ae_password);
|
||||
ae->ae_password = strdup(result + 15);
|
||||
|
|
Loading…
Add table
Reference in a new issue