1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 16:53:14 +02:00

core, plugins: replace "%p" by "%lx" in calls to sscanf

This commit is contained in:
Sébastien Helleu
2025-05-15 20:08:26 +02:00
parent 95a940294e
commit a0ffb9e5dd
4 changed files with 14 additions and 6 deletions
+3 -1
View File
@@ -1151,6 +1151,7 @@ char *
eval_hdata_count (const char *text, struct t_eval_context *eval_context)
{
struct t_hdata *hdata;
unsigned long ptr_value;
void *pointer;
char *pos1, *pos2, *value, *hdata_name, *pointer_name, str_count[64];
int rc, count;
@@ -1181,9 +1182,10 @@ eval_hdata_count (const char *text, struct t_eval_context *eval_context)
if (strncmp (pointer_name, "0x", 2) == 0)
{
rc = sscanf (pointer_name, "%p", &pointer);
rc = sscanf (pointer_name, "%lx", &ptr_value);
if ((rc != EOF) && (rc != 0))
{
pointer = (void *)ptr_value;
if (!hdata_check_pointer (hdata, NULL, pointer))
goto end;
}