OSDN Git Service

make sure we use long instead of int so we dont truncate 64bit values
authorMike Frysinger <vapier@gentoo.org>
Sat, 9 Jul 2005 00:32:45 +0000 (00:32 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 9 Jul 2005 00:32:45 +0000 (00:32 -0000)
ldso/ldso/dl-elf.c

index bf0e1bb..a469ddf 100644 (file)
@@ -782,7 +782,7 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag)
 /* Minimal printf which handles only %s, %d, and %x */
 void _dl_dprintf(int fd, const char *fmt, ...)
 {
-       int num;
+       long num;
        va_list args;
        char *start, *ptr, *string;
        static char *buf;
@@ -830,7 +830,7 @@ void _dl_dprintf(int fd, const char *fmt, ...)
                                case 'd':
                                        {
                                                char tmp[22];
-                                               num = va_arg(args, int);
+                                               num = va_arg(args, long);
 
                                                string = _dl_simple_ltoa(tmp, num);
                                                _dl_write(fd, string, _dl_strlen(string));
@@ -840,7 +840,7 @@ void _dl_dprintf(int fd, const char *fmt, ...)
                                case 'X':
                                        {
                                                char tmp[22];
-                                               num = va_arg(args, int);
+                                               num = va_arg(args, long);
 
                                                string = _dl_simple_ltoahex(tmp, num);
                                                _dl_write(fd, string, _dl_strlen(string));