lkml.org 
[lkml]   [2012]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] vfs: fix uninitialised iattr in do_truncate
From
[PATCH] vfs: fix uninitialised iattr in do_truncate

struct newattrs is uninitialised.

Signed-off-by: Ajeet Yadav <ajeet.yadav.77@gmail.com>
---
fs/open.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/open.c b/fs/open.c
index 77becc0..2676efa 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -37,7 +37,7 @@ int do_truncate(struct dentry *dentry, loff_t
length, unsigned int time_attrs,
struct file *filp)
{
int ret;
- struct iattr newattrs;
+ struct iattr newattrs = {0};

/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
if (length < 0)
--
1.7.8.4

\
 
 \ /
  Last update: 2012-03-24 11:13    [W:0.035 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site