summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-11 20:43:05 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-11 20:43:05 +0100
commit0c14df4d032947b635815e7acf537bd6a49315e5 (patch)
tree08884e3d203d1e7cf3bc32c5a3c0588ed2b5fb79 /src
parent6520f339cb5fe4f2d07e64bec612c33dc1c91acf (diff)
downloadxine-lib-0c14df4d032947b635815e7acf537bd6a49315e5.tar.gz
xine-lib-0c14df4d032947b635815e7acf537bd6a49315e5.tar.bz2
Check if a dot was found before dereferencing the pointer.
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/demux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index 405384626..187c27873 100644
--- a/src/xine-engine/demux.c
+++ b/src/xine-engine/demux.c
@@ -468,9 +468,11 @@ int _x_demux_check_extension (const char *mrl, const char *extensions){
found = 1;
break;
}
- } else if (strcasecmp (last_dot, e) == 0) {
- found = 1;
- break;
+ } else if (last_dot) {
+ if (strcasecmp (last_dot, e) == 0) {
+ found = 1;
+ break;
+ }
}
}
free(ext_copy);