Skip to content
Commit 14a9306e authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

build/i18n-scan.pl: avoid a possible endless loop



Issuing './build/i18n-scan.pl libs/core/' leads to this
endless loop with some perl implementations:

<...>
Use of uninitialized value in concatenation (.) or string at../build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
Use of uninitialized value in concatenation (.) or string at ./build/i18n-scan.pl line 69.
substr outside of string at ./build/i18n-scan.pl line 69.
<...>

Experienced with this perl version:
"This is perl, v5.8.8 built for i386-linux"

Fix it by undefining the 'sub' variable if it is an
empty string.

Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
parent c8b7a975
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment