From: Anatol Belski Date: Thu, 1 Feb 2018 14:30:01 +0000 (+0100) Subject: Ensure there are no line breaks in the error msg X-Git-Tag: php-7.2.3RC1~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=138ea7c3fe6168c0de107893a8ffbe19f25b0c88;p=php Ensure there are no line breaks in the error msg --- diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 89f8aa0569..9cfccd5235 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -88,8 +88,10 @@ PHPAPI void *php_load_shlib(char *path, char **errp) err = GET_DL_ERROR(); #ifdef PHP_WIN32 if (err && (*err)) { + size_t i = strlen(err); (*errp)=estrdup(err); LocalFree(err); + while (i > 0 && isspace((*errp)[i-1])) { (*errp)[i-1] = '\0'; i--; } } else { (*errp) = estrdup(""); }