Issue information

Issue ID
#5337
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Feb 17, 2012 7:14
Last Post
Hercules Elf Bot
Apr 19, 2012 18:27
Confirmation
N/A

Hercules Elf Bot - Feb 17, 2012 7:14

Originally posted by [b]Kazuki-Haru[/b]
There is an unchecked call to WFIFOHEAD() in:
[b]chrif.c[/b]
[indent=1][b]chrif_authreq()[/b][/indent]
[indent=2]...[/indent]
[indent=2]WFIFOHEAD(char_fd,19);[/indent]
[indent=2]...[/indent]

[b]char_fd[/b] is never checked which can lead to a segfault when trying to read [b]session[char_fd][/b] if [b]char_fd [/b]= [b]-1[/b]. I experienced a crash due to this recently on eA trunk r15074.

EDIT: Also, there are two places in [b]chrif.c[/b] where a direct check using [b]if(!chrif_isconnected())[/b] could be replaced with a call to [b]chrif_check()[/b] macro.

This post has been edited by Kazuki-Haru on Feb 17, 2012 7:27

Hercules Elf Bot - Feb 17, 2012 16:56

Originally posted by [b]Ind[/b]
Fixed in [rev=15595]