- Make use of license %macro - Applied spec-cleaner - Added patches: * arc-5.21p-directory-traversel.patch: Fixes a directory traversal vulnerability (CVE-2015-9275 bsc#1121032) * arc-5.21p-fix-arcdie.patch: Fixed a crash on 64 bit machines when arcdie gets called with more than 1 variable argument * arc-5.21p-hdrv1-read-fix.patch: Fixed version 1 arc header reading OBS-URL: https://build.opensuse.org/request/show/663595 OBS-URL: https://build.opensuse.org/package/show/Archiving/arc?expand=0&rev=6
35 lines
856 B
Diff
35 lines
856 B
Diff
Fix arcdie crash when called with more then 1 variable argument
|
|
|
|
Add proper vararg handling to fix crash on 64 bit machines when arcdie gets
|
|
called with more then 1 variable argument.
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
diff -up arc-5.21p/arcmisc.c~ arc-5.21p/arcmisc.c
|
|
--- arc-5.21p/arcmisc.c~ 2010-08-07 15:06:42.000000000 +0200
|
|
+++ arc-5.21p/arcmisc.c 2015-01-16 16:10:29.322603290 +0100
|
|
@@ -4,6 +4,7 @@
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
+#include <stdarg.h>
|
|
#include <ctype.h>
|
|
#include "arc.h"
|
|
|
|
@@ -223,11 +224,13 @@ upper(string)
|
|
}
|
|
/* VARARGS1 */
|
|
VOID
|
|
-arcdie(s, arg1, arg2, arg3)
|
|
- char *s;
|
|
+arcdie(const char *s, ...)
|
|
{
|
|
+ va_list args;
|
|
fprintf(stderr, "ARC: ");
|
|
- fprintf(stderr, s, arg1, arg2, arg3);
|
|
+ va_start(args, s);
|
|
+ vfprintf(stderr, s, args);
|
|
+ va_end(args);
|
|
fprintf(stderr, "\n");
|
|
#if UNIX
|
|
perror("UNIX");
|