Permalink
Browse files

Pull in fix for out-of-bounds array write in xine_demux_sputext.cpp f…

…rom upstream. Coverity 746831

(cherry picked from commit 7030916)
  • Loading branch information...
1 parent 94d67fc commit ed3b7d10a63178bff5ce4134613ff86a85d73830 @stuartm stuartm committed May 29, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 mythtv/libs/libmythtv/xine_demux_sputext.cpp
@@ -887,7 +887,10 @@ static subtitle_t *sub_read_line_jacobsub(demux_sputext_t *demuxstr, subtitle_t
}
}
*q = '\0';
- current->text[current->lines] = strdup(line1);
+ if (current->lines < SUB_MAX_TEXT)
+ current->text[current->lines] = strdup(line1);
+ else
+ printf ("Too many lines in a subtitle\n");
}
current->lines++;
return current;

0 comments on commit ed3b7d1

Please sign in to comment.