]> granicus.if.org Git - php/commitdiff
avoid usage of 'type' before the null pointer check
authorAnatol Belski <ab@php.net>
Fri, 29 Aug 2014 09:21:07 +0000 (11:21 +0200)
committerAnatol Belski <ab@php.net>
Fri, 29 Aug 2014 09:21:07 +0000 (11:21 +0200)
TSRM/tsrm_win32.c

index a116aaf457ff8d9ac4f3a1774ac903ce07f71346..0b8228aafb84fda9fec62b61a7ceb0578c555148 100644 (file)
@@ -457,7 +457,7 @@ TSRM_API FILE *popen(const char *command, const char *type)
 TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC)
 {
        FILE *stream = NULL;
-       int fno, type_len = strlen(type), read, mode;
+       int fno, type_len, read, mode;
        STARTUPINFO startup;
        PROCESS_INFORMATION process;
        SECURITY_ATTRIBUTES security;