mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
connection: Document correct use of atoi()
atoi() has undefined behavior on invalid input, but here the input comes from wayland-scanner, which is trusted. Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
This commit is contained in:
parent
ac630dd3b4
commit
2bd88ca4bf
1 changed files with 1 additions and 0 deletions
|
|
@ -795,6 +795,7 @@ wl_message_get_since(const struct wl_message *message)
|
|||
{
|
||||
int since;
|
||||
|
||||
/* This is trusted input */
|
||||
since = atoi(message->signature);
|
||||
|
||||
if (since == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue