bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: brffer overflow


From: Shigio Yamaguchi
Subject: Re: brffer overflow
Date: Mon, 21 Feb 2005 10:42:50 +0900

Hello,
> I was trying to use Global to examined a large visualization package 
> (ParaView)  While executing htags I received a buffer overflow message 
> that I was able to determine was generated by line 49 strlimcpy.c
> 
>   die("buffer overflow. strlimcpy(dest, '%s', %d).", source, limit);
> 
> The limit was 1024 at this point. It was called from line 170 of 
> dupindex.c

I thought that the line which exceeds 1024 bytes is too long.
However, it is not good to throw work easily.

> As just a hack, I increased the size by a factor of 4 and the code 
> completed.

How about chopping the tail of the line like this?

        strlimcpy(first_line, _, sizeof(first_line));
                |
                v
        strncpy(first_line, _, sizeof(first_line));
        first_line[sizeof(first_line) - 1] = '\0';

The tail part of the line which exceeds 1024 bytes is not important, I think.
I will fix the bug like this if there is no opposite.

Thank you for your report!
--
Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]