Commit Graph

7 Commits

Author SHA1 Message Date
Simon South
18e01e2af6 jam: jcache: Accept empty input files
Make new_string_list() initialize the buffer it creates to hold a file's
contents, preventing a segfault later on should jam attempt to parse the
contents of an empty file.

Fixes #15250.

Change-Id: I907dccd26e1ca35fbe07ed6d624b0144487134fe
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/1716
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-13 20:22:35 +00:00
Ingo Weinhold
531916daa2 jam: jcache: read_file(): fail when encountering too long lines
For its input files jam uses a buffer of 512 chars for fgets(). Lines
would therefore be split silently after that length, which could lead to
"interesting" issues. Now we fail to prevent the situation from going
unnoticed.
2013-07-25 23:00:31 +02:00
Ingo Weinhold
502f1ff979 jam: get_jcache(): clean up when reading the cache failed
When reading the cache file failed we have to assume it is corrupt and
we should use any entries read from it. So now we remove the ones we
read again.
2013-07-25 22:55:11 +02:00
Ingo Weinhold
bbab887c2f jam: delete_jamfile_cache(): don't free cache_file
The value is initialized from a static variable returned by
jcache_name().
2013-07-25 22:52:30 +02:00
Ingo Weinhold
a9f1022a2a jam: jcache: typo in comment 2013-07-25 22:50:34 +02:00
Ingo Weinhold
a676a7f33a Don't use unknown strings as fprintf() format.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@35719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-02 13:30:31 +00:00
Ingo Weinhold
ecc89c9a6a Moved jam into the buildtools modules, where it belongs.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@15729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 18:40:48 +00:00