aboutsummaryrefslogtreecommitdiffhomepage
path: root/sub/subreader.c
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2013-05-06 20:58:54 +0200
committerGravatar wm4 <wm4@nowhere>2013-05-06 23:11:11 +0200
commit885c6a2610619ad3ee2b01ae7ec7670f8551d388 (patch)
tree7a9d2d4f9516c417e15e16613bb71a87f1feca3f /sub/subreader.c
parentab776adeceb4b9b6ce7adde5a857ffc1e4b2c4ae (diff)
Fix some cppcheck / scan-build warnings
These were found by the cppcheck and scan-build static analyzers. Most of these aren't interesting (the 2 previous commits fix some interesting cases found by these analyzers), and they don't nearly fix all warnings. (Most of the unfixed warnings are spam, things MPlayer never cared about, or false positives.)
Diffstat (limited to 'sub/subreader.c')
-rw-r--r--sub/subreader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sub/subreader.c b/sub/subreader.c
index a109d0c362..090cd0a8b4 100644
--- a/sub/subreader.c
+++ b/sub/subreader.c
@@ -1511,7 +1511,7 @@ if ((suboverlap_enabled == 2) ||
// from a block of sub_to_add+1 subs
placeholder = malloc(sizeof(int *) * counter);
for (i = 0; i < counter; ++i) {
- placeholder[i] = malloc(sizeof(int) * lines_to_add);
+ placeholder[i] = malloc(sizeof(int) * lines_to_add + 1);
for (j = 0; j < lines_to_add; ++j) {
placeholder[i][j] = -1;
}