about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-03-13 09:43:50 +0000
committerEric Wong <normalperson@yhbt.net>2011-03-13 09:43:50 +0000
commitc55831a01dab548fdf9eccb7529396f6582c6637 (patch)
tree62443464b077d93289d0728dc9da9ef97326c14b
parentecd7877787a156e476e31b7108e7b9f15f7523d8 (diff)
Unlikely, but some app could pass '\0' into us
-rw-r--r--ext/clogger_ext/clogger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c
index ad37d7d..1641f48 100644
--- a/ext/clogger_ext/clogger.c
+++ b/ext/clogger_ext/clogger.c
@@ -891,7 +891,7 @@ static VALUE to_path(VALUE self)
         struct stat sb;
         int rv;
         unsigned devfd;
-        const char *cpath = StringValuePtr(path);
+        const char *cpath = StringValueCStr(path);
 
         /* try to avoid an extra path lookup  */
         if (rb_respond_to(c->body, to_io_id))