Browse Source

fixed screen's va_list useage (again - only visible on non-x86 system)

git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1766 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 22 years ago
parent
commit
14894c76f7
2 changed files with 20 additions and 1 deletions
  1. +1
    -0
      Documentation/Developers/CHANGELOG-RENE
  2. +19
    -1
      package/base/screen/correct_va_list.patch

+ 1
- 0
Documentation/Developers/CHANGELOG-RENE

@ -7,6 +7,7 @@
and python (2.3.2) - thanks to the security notification from and python (2.3.2) - thanks to the security notification from
Stefan Koerner Stefan Koerner
- Michael Obster: updated popt (1.7) - Michael Obster: updated popt (1.7)
- fixed screen's va_list useage (again - only visible on non-x86 system)
*) 2003-11-13 (2.0.0-rc2 - 2.0.0-rc3) *) 2003-11-13 (2.0.0-rc2 - 2.0.0-rc3)

+ 19
- 1
package/base/screen/correct_va_list.patch

@ -20,7 +20,6 @@
# #
# --- ROCK-COPYRIGHT-NOTE-END --- # --- ROCK-COPYRIGHT-NOTE-END ---
On some architectures that either store the variable args as an array On some architectures that either store the variable args as an array
of pointers (of length 1) or they are passed in registers (see man va_arg) of pointers (of length 1) or they are passed in registers (see man va_arg)
the macro va_copy is needed .... the macro va_copy is needed ....
@ -57,3 +56,22 @@ the macro va_copy is needed ....
VA_END(ap); VA_END(ap);
if (err) if (err)
{ {
--- ./screen.c 2003-11-14 19:51:27.000000000 +0100
+++ ./screen.c 2003-11-14 19:49:16.000000000 +0100
@@ -1890,12 +1890,15 @@
#endif
{
VA_LIST(ap)
+ VA_LIST(aq)
char buf[MAXPATHLEN*2];
char *p = buf;
VA_START(ap, fmt);
fmt = DoNLS(fmt);
- (void)vsnprintf(p, sizeof(buf) - 100, fmt, VA_ARGS(ap));
+ va_copy (aq, ap);
+ (void)vsnprintf(p, sizeof(buf) - 100, fmt, aq);
+ VA_END(aq);
VA_END(ap);
if (err)
{

Loading…
Cancel
Save