]> git.pond.sub.org Git - empserver/commitdiff
Fix a long vs. int format string bug in xdprsym()
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 2 Aug 2008 16:04:06 +0000 (12:04 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 2 Aug 2008 16:04:06 +0000 (12:04 -0400)
Could print junk on machines where long is wider than int, but only in
oops recovery.

src/lib/common/xdump.c

index edc1059cd637d87d1f64b06617f8e2f5de13e6f0..d591f54a7584ac0c37318df5522ffc1508ef26ab 100644 (file)
@@ -183,7 +183,7 @@ xdprsym(struct xdstr *xd, int key, int type, char *sep)
     char *sym = symbol_by_value(key, ef_ptr(type, 0));
 
     if (CANT_HAPPEN(!sym))
-       xd->pr("%s%ld", sep, key);
+       xd->pr("%s%d", sep, key);
     else {
        xd->pr("%s", sep);
        xdpresc(xd, sym, INT_MAX);