mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity 169275 - lwsgt check string bounds
This commit is contained in:
parent
16f3e4cacf
commit
e0212b8c85
1 changed files with 2 additions and 1 deletions
|
@ -304,7 +304,8 @@ lwsgs_handler_change_password(struct per_vhost_data__gs *vhd, struct lws *wsi,
|
|||
return 1;
|
||||
}
|
||||
|
||||
strcpy(u.username, lws_spa_get_string(pss->spa, FGS_USERNAME));
|
||||
strncpy(u.username, lws_spa_get_string(pss->spa, FGS_USERNAME), sizeof(u.username) - 1);
|
||||
u.username[sizeof(u.username) - 1] = '\0';
|
||||
}
|
||||
|
||||
/* does he want to delete his account? */
|
||||
|
|
Loading…
Add table
Reference in a new issue