Kristján Valur Jónsson <krist...@ccpgames.com> added the comment:

I don't quite understand what you're saying about line mismatch Victor.
Anyway, if you look at it, it is clear that:
1) sys_update_path() can be called with argc==0 (main.c line 647)
2) 1742 was always setting arg0 to argv[0] that is undefined and this access 
may cause a crash if 1) above is true
3) line 1812 assumes n to be equal to the length of arg0, but depending on 
conditional compilation, it may not get set at all, and in any case, in line 
line 1805 it gets set only if p is not NULL.

I think it is simply safer to make the proper assumptions.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3367>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to