Issue information

Issue ID
#200
Status
Fixed
Severity
Critical
Started
Hercules Elf Bot
Oct 9, 2007 15:06
Last Post
Hercules Elf Bot
Oct 9, 2007 15:06
Confirmation
N/A

Hercules Elf Bot - Oct 9, 2007 15:06

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=200

CODE
static int itemdb_readdb(void)
{
    char line[1024];
...
    // process rows one by one
    p = line;
    <keep writing stuff into 'line'>

CODE
static int itemdb_read_sqldb(void)
{
...
    // wrap the result into a TXT-compatible format
    char line[1024];

    for (i = 0, p = line; i < 22; i++) {
        <keep writing stuff into 'line'>

Well, someone wrote an item script longer than ~900 chars. Boom.
This is hard to deal with because of the way the data is written to the buffer (no clear place to add checks to).
What to do? Just increase 1024 to... 8192 or such?

PS: Thanks to Ancyker for having servers with ridiculously long item scripts (IMG:style_emoticons/default/wink.gif)