diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-10-29 18:46:44 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-10-29 18:46:44 +0100 |
commit | 503a7210275e0f3e41cc479b81922a19968cf9cf (patch) | |
tree | 2314defc68d9d5ffb7cdde0dc408da52b93b3556 /extensions/source/nsplugin | |
parent | dca5cf3fdaaed8be10e8ca32fa8d7b4e0647e17b (diff) |
vcl107: #i106443# check fgets (thanks cmc)
Diffstat (limited to 'extensions/source/nsplugin')
-rw-r--r-- | extensions/source/nsplugin/source/so_env.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index df23100e3859..92bcab19bd59 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -310,7 +310,8 @@ char* NSP_getProductName() char *pEnd = 0; while(!feof(fp)) { - fgets( line, sizeof(line), fp ); + if (fgets( line, sizeof(line), fp ) == NULL) + continue; if (NULL == (pStart = strstr( line, "ProductKey=" ))) continue; pStart += strlen("ProductKey="); |