bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot process scripts beyond an embedded NULL character when running in


From: Roman Rakus
Subject: Cannot process scripts beyond an embedded NULL character when running in 'source' mode
Date: Tue, 02 Jun 2009 13:33:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2

When you are sourcing bash script, which contains \0 character, bash thinks it is end of file. I have investigated, that `source' loads entire file into memory as string. Then \0 is end of this string. One of the possible solution is to left out all \0 characters. This doesn't seem to be perfect. Another possible solution is to count size of the file and then compare the size with actual string parsing.
Maybe other solutions...

Which solution should be the best?
RR




reply via email to

[Prev in Thread] Current Thread [Next in Thread]