]> granicus.if.org Git - php/commitdiff
- don't continue if no valid option value
authorPierre Joye <pajoye@php.net>
Thu, 20 Jan 2011 07:38:00 +0000 (07:38 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 20 Jan 2011 07:38:00 +0000 (07:38 +0000)
main/streams/plain_wrapper.c

index fdc7fd28412409276997a48ee898479cb901db9f..96332df843a4d747d7f987c4737891a3275d82ce 100644 (file)
@@ -713,6 +713,8 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
                                                                acc = FILE_MAP_READ | FILE_MAP_WRITE;
                                                                /* TODO: we should assign a name for the mapping */
                                                                break;
+                                                       default:
+                                                               return PHP_STREAM_OPTION_RETURN_ERR;
                                                }
 
                                                /* create a mapping capable of viewing the whole file (this costs no real resources) */