aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/GL/glx/glxcmds.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-03-01 11:59:55 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-03-01 11:59:55 +0100
commitd156ce5ab6afa3bc67189f4985e1517d5aca52b3 (patch)
tree76679bd38f93ec2b069e20db90d4e602d368d0ec /nx-X11/programs/Xserver/GL/glx/glxcmds.c
parenta70e36c8114c0358258e8c3964b9d897884e265e (diff)
parente7a50079ed90bd9f9f292d3f40ed3905c034a4cc (diff)
downloadnx-libs-d156ce5ab6afa3bc67189f4985e1517d5aca52b3.tar.gz
nx-libs-d156ce5ab6afa3bc67189f4985e1517d5aca52b3.tar.bz2
nx-libs-d156ce5ab6afa3bc67189f4985e1517d5aca52b3.zip
Merge branch 'uli42-pr/xfixes_memset' into 3.6.x
Attributes GH PR #788: https://github.com/ArcticaProject/nx-libs/pull/788
Diffstat (limited to 'nx-X11/programs/Xserver/GL/glx/glxcmds.c')
-rw-r--r--nx-X11/programs/Xserver/GL/glx/glxcmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c
index 353697727..16ecdb1e0 100644
--- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c
+++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c
@@ -2084,7 +2084,7 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
reply.n = n;
/* Allocate buffer to make sure it's a multiple of 4 bytes big.*/
- buf = (char *) malloc(length << 2);
+ buf = calloc(length, 4);
if (buf == NULL)
return BadAlloc;
memcpy(buf, ptr, n);
@@ -2141,7 +2141,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
reply.length = length;
reply.n = n;
- if ((buf = (char *) malloc(length << 2)) == NULL) {
+ if ((buf = calloc(length, 4)) == NULL) {
return BadAlloc;
}
memcpy(buf, ptr, n);