Menu

#218 gemrb hangs if config contains lines with whitespace only

GemRB Main Engine
closed-fixed
4
2011-03-27
2011-03-25
No

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe6ffa84000
read(3, "################################"..., 4096) = 4096
lseek(3, -2150, SEEK_CUR) = 1946
read(3, "GameType=how\n\n##################"..., 4096) = 4096
lseek(3, 6042, SEEK_SET) = 6042
lseek(3, 6042, SEEK_SET) = 6042
.....

Discussion

  • Jarda Benkovsky

    Jarda Benkovsky - 2011-03-25

    also the config search code uses PathJoin which nowadays does too much stuff behind the scenes, would be better to change to use PathAppend.

     
  • Willem Jan Palenstijn

    Some details:

    It'll get stuck in an infinite loop of reading one character and going back one character, with the 'continue' here:

    if (fscanf( config, "%64[^= ] = %[^\r\n]%*[\r\n]", name, value )!=2)
    continue;

     
  • Jarda Benkovsky

    Jarda Benkovsky - 2011-03-25

    also downplay the errors for separate cfg files, print error only in the end

     
  • Jarda Benkovsky

    Jarda Benkovsky - 2011-03-25
    • assigned_to: avenger_teambg --> edheldil
     
  • Jarda Benkovsky

    Jarda Benkovsky - 2011-03-27
    • status: open --> closed-fixed
     
  • Jarda Benkovsky

    Jarda Benkovsky - 2011-03-27

    Should be fixed in master

     

Log in to post a comment.