|author||Egbert Eich <email@example.com>||2008-08-03 11:24:49 (GMT)|
|committer||Egbert Eich <firstname.lastname@example.org>||2008-08-03 11:24:49 (GMT)|
Fix for 64bit: feed a pointer to the right size variable to scanf().
XID is unsigned long, however %x in scanf takes a pointer to an unsigned int. Thus with XID xid, a sscanf(..., "0x%x", &xid) will most likely produce the wrong results.
1 files changed, 2 insertions, 1 deletions
@@ -428,7 +428,8 @@ set_name_all (name_t *name, name_t *old)
set_name (name_t *name, char *string, name_kind_t valid)
- XID xid;
+ unsigned int xid; /* don't make it XID (which is unsigned long):
+ scanf() takes unsigned int */
if ((valid & name_xid) && sscanf (string, "0x%x", &xid) == 1)