Crash since Commit "use strrchr() instead of rindex()" #52

Closed
trtracer opened this Issue Jun 24, 2012 · 1 comment

Comments

Projects
None yet
2 participants

Hi!

Your recent change from rindex() to strrchr() introduce a null-pointer-deref in XVDRData.cpp.

char* p = (char*)strrchr(title, '~');
 if(*p == 0) {

strrchr() returns a NULL if no occurence is found and if so the plugin and xbmc crashes.

I think

if (p == NULL || *p == 0) {

would be better.

Tobias

Owner

pipelka commented Jun 25, 2012

Thanks. For reporting this.

Regards,
Alex

pipelka closed this in df31b08 Jun 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment