mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 00:03:12 +02:00
core, plugins: set error to NULL before calling strtol()
This is not strictly necessary, just in case the function strtol() doesn't update the pointer.
This commit is contained in:
@@ -63,6 +63,7 @@ xfer_network_convert_integer_to_ipv4 (const char *str_address)
|
||||
if (!str_address || !str_address[0])
|
||||
return NULL;
|
||||
|
||||
error = NULL;
|
||||
number = strtoll (str_address, &error, 10);
|
||||
if (!error || error[0] || (number <= 0) || (number > UINT32_MAX))
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user