lkml.org 
[lkml]   [2010]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdoes "block: add secure discard" cause an overflow?
This is the commit 8d57a98ccd0b44 "block: add secure discard".

The patch adds a letter 'E' to the string in blk_fill_rwbs().
if (rw & REQ_SECURE)
rwbs[i++] = 'E';

The problem is that "rwbs" is a 6 character buffer and if all the flags
are set the we'd get "WABSME" which would put us off the end (when you
add the NUL terminator).

regards,
dan carpenter


\
 
 \ /
  Last update: 2010-09-03 11:19    [W:0.029 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site