diff options
-rw-r--r-- | debian/patches/056_nx-X11_Werror-format-security.full.patch | 107 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | nx-X11/lib/xtrans/Xtransint.h | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glximports.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Error.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Init.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/os/log.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/nxauth/process.c | 2 |
8 files changed, 11 insertions, 119 deletions
diff --git a/debian/patches/056_nx-X11_Werror-format-security.full.patch b/debian/patches/056_nx-X11_Werror-format-security.full.patch deleted file mode 100644 index a047de774..000000000 --- a/debian/patches/056_nx-X11_Werror-format-security.full.patch +++ /dev/null @@ -1,107 +0,0 @@ -Description: Fix -Werror=format-security errors -Author: Orion Poplawski <orion@cora.nwra.com> -Abstract: - The below patch fixes more -Werror=format-security errors. - Interestingly, most of the errors only showed up on our arm builds. No - idea why. ---- a/nx-X11/lib/xtrans/Xtransint.h -+++ b/nx-X11/lib/xtrans/Xtransint.h -@@ -444,7 +444,7 @@ - int hack= 0, saveerrno=errno; \ - struct timeval tp;\ - gettimeofday(&tp,0); \ -- ErrorF(__xtransname); \ -+ ErrorF("%s",__xtransname); \ - ErrorF(x+hack,a,b,c); \ - ErrorF("timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ - errno=saveerrno; \ -@@ -454,7 +454,7 @@ - int hack= 0, saveerrno=errno; \ - struct timeval tp;\ - gettimeofday(&tp,0); \ -- fprintf(stderr, __xtransname); fflush(stderr); \ -+ fprintf(stderr, "%s",__xtransname); fflush(stderr); \ - fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ - fprintf(stderr, "timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ - fflush(stderr); \ -@@ -466,14 +466,14 @@ - /* Use ErrorF() for the X server */ - #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ - int hack= 0, saveerrno=errno; \ -- ErrorF(__xtransname); \ -+ ErrorF("%s",__xtransname); \ - ErrorF(x+hack,a,b,c); \ - errno=saveerrno; \ - } else ((void)0) - #else - #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ - int hack= 0, saveerrno=errno; \ -- fprintf(stderr, __xtransname); fflush(stderr); \ -+ fprintf(stderr, "%s",__xtransname); fflush(stderr); \ - fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ - errno=saveerrno; \ - } else ((void)0) ---- a/nx-X11/programs/nxauth/process.c -+++ b/nx-X11/programs/nxauth/process.c -@@ -974,7 +974,7 @@ - char *hex; - - hex = bintohex(len, cp); -- fprintf(fp, hex); -+ fprintf(fp, "%s", hex); - free(hex); - } - ---- a/nx-X11/programs/Xserver/GL/glx/glximports.c -+++ b/nx-X11/programs/Xserver/GL/glx/glximports.c -@@ -110,12 +110,12 @@ - - void __glXImpWarning(__GLcontext *gc, char *msg) - { -- ErrorF((char *)msg); -+ ErrorF("%s",(char *)msg); - } - - void __glXImpFatal(__GLcontext *gc, char *msg) - { -- ErrorF((char *)msg); -+ ErrorF("%s",(char *)msg); - __glXAbort(); - } - ---- a/nx-X11/programs/Xserver/hw/nxagent/Error.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c -@@ -232,7 +232,7 @@ - - int nxagentExitHandler(const char *message) - { -- FatalError(message); -+ FatalError("%s", message); - - return 0; - } ---- a/nx-X11/programs/Xserver/hw/nxagent/Init.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c -@@ -481,7 +481,7 @@ - - nxagentStartRedirectToClientsLog(); - -- fprintf(stderr, buffer); -+ fprintf(stderr, "%s", buffer); - - nxagentEndRedirectToClientsLog(); - } ---- a/nx-X11/programs/Xserver/os/log.c -+++ b/nx-X11/programs/Xserver/os/log.c -@@ -692,9 +692,9 @@ - return; - sprintf(err, "%s: ", str); - strcat(err, strerror(saveErrno)); -- LogWrite(-1, err); -+ LogWrite(-1, "%s", err); - } else -- LogWrite(-1, strerror(saveErrno)); -+ LogWrite(-1, "%s", strerror(saveErrno)); - } - - void diff --git a/debian/patches/series b/debian/patches/series index afae768fa..ef4671ef7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -056_nx-X11_Werror-format-security.full.patch 057_nx-X11_sanitize-eventmasks.full.patch 101_nxagent_set-rgb-path.full.patch 102_xserver-xext_set-securitypolicy-path.full.patch diff --git a/nx-X11/lib/xtrans/Xtransint.h b/nx-X11/lib/xtrans/Xtransint.h index 1e63a1406..5ca0d9328 100644 --- a/nx-X11/lib/xtrans/Xtransint.h +++ b/nx-X11/lib/xtrans/Xtransint.h @@ -444,7 +444,7 @@ static int trans_mkdir ( int hack= 0, saveerrno=errno; \ struct timeval tp;\ gettimeofday(&tp,0); \ - ErrorF(__xtransname); \ + ErrorF("%s",__xtransname); \ ErrorF(x+hack,a,b,c); \ ErrorF("timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ errno=saveerrno; \ @@ -454,7 +454,7 @@ static int trans_mkdir ( int hack= 0, saveerrno=errno; \ struct timeval tp;\ gettimeofday(&tp,0); \ - fprintf(stderr, __xtransname); fflush(stderr); \ + fprintf(stderr, "%s",__xtransname); fflush(stderr); \ fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ fprintf(stderr, "timestamp (ms): %d\n",tp.tv_sec*1000+tp.tv_usec/1000); \ fflush(stderr); \ @@ -466,14 +466,14 @@ static int trans_mkdir ( /* Use ErrorF() for the X server */ #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ int hack= 0, saveerrno=errno; \ - ErrorF(__xtransname); \ + ErrorF("%s",__xtransname); \ ErrorF(x+hack,a,b,c); \ errno=saveerrno; \ } else ((void)0) #else #define PRMSG(lvl,x,a,b,c) if (lvl <= XTRANSDEBUG){ \ int hack= 0, saveerrno=errno; \ - fprintf(stderr, __xtransname); fflush(stderr); \ + fprintf(stderr, "%s",__xtransname); fflush(stderr); \ fprintf(stderr, x+hack,a,b,c); fflush(stderr); \ errno=saveerrno; \ } else ((void)0) diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c index fae2346b9..435caca58 100644 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ b/nx-X11/programs/Xserver/GL/glx/glximports.c @@ -110,12 +110,12 @@ void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize) void __glXImpWarning(__GLcontext *gc, char *msg) { - ErrorF((char *)msg); + ErrorF("%s",(char *)msg); } void __glXImpFatal(__GLcontext *gc, char *msg) { - ErrorF((char *)msg); + ErrorF("%s",(char *)msg); __glXAbort(); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c index 43bf85900..d9016436e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Error.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c @@ -232,7 +232,7 @@ static int nxagentPrintError(dpy, event, fp) int nxagentExitHandler(const char *message) { - FatalError(message); + FatalError("%s", message); return 0; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index a50e8a5fc..acd5d419c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -481,7 +481,7 @@ void OsVendorVErrorFFunction(const char *f, va_list args) nxagentStartRedirectToClientsLog(); - fprintf(stderr, buffer); + fprintf(stderr, "%s", buffer); nxagentEndRedirectToClientsLog(); } diff --git a/nx-X11/programs/Xserver/os/log.c b/nx-X11/programs/Xserver/os/log.c index 04e24b8df..1b28bb141 100644 --- a/nx-X11/programs/Xserver/os/log.c +++ b/nx-X11/programs/Xserver/os/log.c @@ -692,9 +692,9 @@ Error(char *str) return; sprintf(err, "%s: ", str); strcat(err, strerror(saveErrno)); - LogWrite(-1, err); + LogWrite(-1, "%s", err); } else - LogWrite(-1, strerror(saveErrno)); + LogWrite(-1, "%s", strerror(saveErrno)); } void diff --git a/nx-X11/programs/nxauth/process.c b/nx-X11/programs/nxauth/process.c index 57090e23e..76259d76a 100644 --- a/nx-X11/programs/nxauth/process.c +++ b/nx-X11/programs/nxauth/process.c @@ -974,7 +974,7 @@ fprintfhex(register FILE *fp, int len, char *cp) char *hex; hex = bintohex(len, cp); - fprintf(fp, hex); + fprintf(fp, "%s", hex); free(hex); } |