Re: [PATCH v2] fs: select: fix information leak to userspace

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pádraig Brady
Date: Wednesday, November 24, 2010 - 3:44 am

On 23/11/10 18:02, Andreas Dilger wrote:

Zero padding structs is part of C90. Details here:
http://www.pixelbeat.org/programming/gcc/auto_init.html

gcc doesn't zero pad when _all_ elements are specified.

So perhaps just:

-        struct timespec rts;
-        struct timeval rtv;
+        struct timespec rts = {0,};
+        struct timeval rtv = {0,};

One could also move the rtv declaration
to the scope where it's used.

cheers,
Pádraig.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fs: select: fix information leak to userspace, Vasiliy Kulikov, (Wed Nov 10, 1:38 pm)
Re: [PATCH] fs: select: fix information leak to userspace, Andrew Morton, (Fri Nov 12, 1:08 pm)
Re: [PATCH] fs: select: fix information leak to userspace, Andreas Dilger, (Sat Nov 13, 2:38 pm)
[PATCH v2] fs: select: fix information leak to userspace, Vasiliy Kulikov, (Sun Nov 14, 2:25 am)
Re: [PATCH] fs: select: fix information leak to userspace, Andrew Morton, (Sun Nov 14, 7:05 pm)
Re: [PATCH v2] fs: select: fix information leak to userspace, Andreas Dilger, (Tue Nov 23, 11:02 am)
Re: [PATCH v2] fs: select: fix information leak to userspace, Pádraig Brady, (Wed Nov 24, 3:44 am)
Re: [PATCH v2] fs: select: fix information leak to userspace, Valdis.Kletnieks, (Wed Nov 24, 10:54 am)