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 <[EMAIL PROTECTED]> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


_______________________________________________
Bug-global mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to