projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af617c6
)
glsl: Raise an error on an unfinished comment block.
author
Michal Krol
<michal@vmware.com>
Sat, 13 Jun 2009 11:50:45 +0000
(13:50 +0200)
committer
Michal Krol
<michal@vmware.com>
Mon, 7 Sep 2009 08:11:37 +0000
(10:11 +0200)
src/glsl/pp/sl_pp_purify.c
patch
|
blob
|
history
diff --git
a/src/glsl/pp/sl_pp_purify.c
b/src/glsl/pp/sl_pp_purify.c
index 7fbfc78d42690b16aba0847a08bdd008dac21c59..ded4dc8963b0bf4d4f3d6c51e46d9b4ec773a198 100644
(file)
--- a/
src/glsl/pp/sl_pp_purify.c
+++ b/
src/glsl/pp/sl_pp_purify.c
@@
-152,6
+152,9
@@
_purify_comment(const char *input,
return eaten;
}
}
+ if (next == '\0') {
+ return 0;
+ }
}
}
}
@@
-171,8
+174,13
@@
sl_pp_purify(const char *input,
for (;;) {
char c;
+ unsigned int eaten;
- input += _purify_comment(input, &c);
+ eaten = _purify_comment(input, &c);
+ if (!eaten) {
+ return -1;
+ }
+ input += eaten;
if (out_len >= out_max) {
unsigned int new_max = out_max;