]> git.ipfire.org Git - thirdparty/ccache.git/commit
Fix comment scanning bug in hash_source_code_string
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 20 Feb 2015 19:32:33 +0000 (20:32 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 7 Mar 2015 14:55:48 +0000 (15:55 +0100)
commit2f8422af65c44526e3d54d961be1134a5c225aac
tree0311e36cbe8a3522db496b7a8f8b6f1388760044
parentd2786183f35efe33c2230c68c70b1a911e89f89e
Fix comment scanning bug in hash_source_code_string

hash_source_code_string tries to ignore __DATE__/__TIME strings in
comments, but fails to parse code that contains character literal of a
double quote. This could result in false cache hits when the source code
happens to contain '"' followed by " /*" or " //" (with variations).

The fix is to do like it's already done in ccache 3.2: Don't try to be
overly clever about __DATE__/__TIME__, just check for those strings
anywhere in the source code string.
NEWS.txt
dev.mk.in
hashutil.c
hashutil.h
macroskip.h [new file with mode: 0644]
test.sh
test/test_hashutil.c