changeset 33431:cdc8cec139ad

Avoid possible crash if cue filename is very short.
author reimar
date Sun, 29 May 2011 12:16:13 +0000
parents a1184b9d68de
children 4ecf8f0b024c
files stream/stream_cue.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_cue.c	Sun May 29 12:05:59 2011 +0000
+++ b/stream/stream_cue.c	Sun May 29 12:16:13 2011 +0000
@@ -210,6 +210,8 @@
 
   fd_bin = -1;
   for (i = 0; fd_bin == -1 && i < 6; i++) {
+    if (i > 1 && strlen(cue_filename) < 3)
+      break;
     switch (i) {
     case 0:
       /* now try to open that file, without path */