From a402ed0162562b43a945d9a90b406c54c87c72b6 Mon Sep 17 00:00:00 2001 From: Bhavi Dhingra Date: Thu, 4 Jun 2015 19:07:12 -0700 Subject: omGeneric.c: Correct the parameter usage of sizeof Incorrect parameter usage with sizeof. Earlier passed argument FontData will be 4 bytes always as its a pointer hence the change is needed and FontDataRec should be used for memset. Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/omGeneric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11') diff --git a/nx-X11/lib/X11/omGeneric.c b/nx-X11/lib/X11/omGeneric.c index 91f4280d0..c790bbc44 100644 --- a/nx-X11/lib/X11/omGeneric.c +++ b/nx-X11/lib/X11/omGeneric.c @@ -105,7 +105,7 @@ init_fontdata( if(fd == (FontData) NULL) return False; - memset(fd, 0x00, sizeof(FontData) * font_data_count); + memset(fd, 0x00, sizeof(FontDataRec) * font_data_count); for(i = 0 ; i < font_data_count ; i++) fd[i] = font_data[i]; -- cgit v1.2.3