Menu

#21 negative integers cause metadata parsing to abort

open
nobody
None
5
2015-04-01
2011-01-16
No

i noticed with a bunch of random torrents that ctorrent would simply exit with "error, initial meta info failed". since this got to be bothersome, i dug into it. if an integer with a negative value happens to occur before the "info" dictionary, then ctorrent aborts its parsing phase and exits immediately.

i wrote a patch to simply skip over the negative sign if present. the strtoll() already takes care of correctly parsing this, so there should be no need for ctorrent itself to worry about it.

Discussion

  • Mike Frysinger

    Mike Frysinger - 2011-01-16

    simple fix

     
  • SeijiSensei

    SeijiSensei - 2012-09-11

    Thank you so much for this patch! It applied cleanly and fixed the problem.

    I was quite annoyed when I got the "meta info error." You saved the day.

     

Log in to post a comment.