http://bugs.freedesktop.org/show_bug.cgi?id=32701
http://bugs.gentoo.org/show_bug.cgi?id=347758

Signed-off-by: Ulrich Mueller <[email protected]>
---
 xrdb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xrdb.c b/xrdb.c
index 21005c0..2972da1 100644
--- a/xrdb.c
+++ b/xrdb.c
@@ -883,7 +883,10 @@ main(int argc, char *argv[])
 
        for (j = 0; j < number_of_elements; j++) {
            if (access(cpp_locations[j], X_OK) == 0) {
-               cpp_program = cpp_locations[j];
+               if ((cpp_program =
+                       (char *)malloc(strlen(cpp_locations[j]) + 4)) == NULL)
+                   fatal("%s: Out of memory\n", ProgramName);
+               sprintf(cpp_program, "%s -P", cpp_locations[j]);
                break;
            }
        } 
-- 
1.7.3.4
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to