lkml.org 
[lkml]   [2010]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Char: synclink, fix potential null dereference
On 01/10/2010 09:51 AM, Jiri Slaby wrote:
> Stanse found a potential null dereference in mgsl_put_char and
> mgsl_write. There is a check for tty being NULL, but it is
> dereferenced earlier. Move the dereference after the check.
>
> Also reorder mgsl_paranoia_check so that it makes sense:
> * check !tty
> * deref tty
> * check !info
> * deref info

Actually, this is wrong, .write and .put_char cannot be called with NULL
tty.

--
js


\
 
 \ /
  Last update: 2010-01-10 12:25    [W:0.031 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site