From fc6946e96f2ac45a2713a045c3362573efd27263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 26 Sep 2006 22:10:24 +0000 Subject: Check for validity of the pointer before using strlen() on it. Found by Coverity Scan CID 242. Fixed upstream too. CVS patchset: 8308 CVS date: 2006/09/26 22:10:24 --- src/input/vcd/libcdio/MSWindows/win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/input/vcd/libcdio/MSWindows/win32.c b/src/input/vcd/libcdio/MSWindows/win32.c index 9635161fb..1c9d9b93d 100644 --- a/src/input/vcd/libcdio/MSWindows/win32.c +++ b/src/input/vcd/libcdio/MSWindows/win32.c @@ -1,5 +1,5 @@ /* - $Id: win32.c,v 1.2 2005/01/01 02:43:58 rockyb Exp $ + $Id: win32.c,v 1.3 2006/09/26 22:10:24 dgp85 Exp $ Copyright (C) 2003, 2004 Rocky Bernstein @@ -26,7 +26,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: win32.c,v 1.2 2005/01/01 02:43:58 rockyb Exp $"; +static const char _rcsid[] = "$Id: win32.c,v 1.3 2006/09/26 22:10:24 dgp85 Exp $"; #include #include @@ -670,8 +670,8 @@ cdio_is_device_win32(const char *source_name) { unsigned int len; - len = strlen(source_name); if (NULL == source_name) return false; + len = strlen(source_name); #ifdef HAVE_WIN32_CDROM if ((len == 2) && isalpha(source_name[0]) -- cgit v1.2.3