On 07/18/2013 04:18 PM, Chen Gang wrote:
> On 07/18/2013 03:54 PM, Chen Gang wrote:
>> On 07/18/2013 03:43 PM, Al Viro wrote:
>>> On Thu, Jul 18, 2013 at 03:29:17PM +0800, Chen Gang wrote:
> On 07/18/2013 12:28 PM, Chen Gang wrote:
>>>
> strcpy(fmt1, fmt);
> @@ -199,
On 07/18/2013 03:54 PM, Chen Gang wrote:
> On 07/18/2013 03:43 PM, Al Viro wrote:
>> On Thu, Jul 18, 2013 at 03:29:17PM +0800, Chen Gang wrote:
On 07/18/2013 12:28 PM, Chen Gang wrote:
>>
strcpy(fmt1, fmt);
@@ -199,46 +214,51 @@ static void prepare_error_buf(cons
On 07/18/2013 03:43 PM, Al Viro wrote:
> On Thu, Jul 18, 2013 at 03:29:17PM +0800, Chen Gang wrote:
>> > On 07/18/2013 12:28 PM, Chen Gang wrote:
>>> > >
> >> strcpy(fmt1, fmt);
> >> @@ -199,46 +214,51 @@ static void prepare_error_buf(const char *fmt,
> >> va_list args)
On Thu, Jul 18, 2013 at 03:29:17PM +0800, Chen Gang wrote:
> On 07/18/2013 12:28 PM, Chen Gang wrote:
> >
> >>strcpy(fmt1, fmt);
> >> @@ -199,46 +214,51 @@ static void prepare_error_buf(const char *fmt,
> >> va_list args)
> >>while ((k = is_there_reiserfs_struct(fmt1, &what)) != NULL) {
On 07/18/2013 12:28 PM, Chen Gang wrote:
>
>> strcpy(fmt1, fmt);
>> @@ -199,46 +214,51 @@ static void prepare_error_buf(const char *fmt, va_list
>> args)
>> while ((k = is_there_reiserfs_struct(fmt1, &what)) != NULL) {
>> *k = 0;
>>
>> -p += vsprintf(p, fmt1,
I have given a simple test for it.
for current REISERFS_MAX_ERROR_BUF (error_buffer[4096]), it will report
the full message warnings.
[root@dhcp122 ~]# mount /dev/sda11 /mnt/sda11
[root@dhcp122 ~]# dmesg | grep reiser
[ 423.421532] REISERFS warning (device sda11): reiserfs_fill_super:
CONFIG_
If format string and/or error string are larger than 1024, it will
cause memory overflow.
So need check the format string buffer length before process it.
Also need use (v)snprintf() instread of (v)sprintf() for error buffer
to be sure of maximize length limitation.
Normally, the error buffer le
7 matches
Mail list logo