فهرست منبع

make sure we use long instead of int so we dont truncate 64bit values

Mike Frysinger 20 سال پیش
والد
کامیت
911e3b1d97
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      ldso/ldso/dl-elf.c

+ 3 - 3
ldso/ldso/dl-elf.c

@@ -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));