diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-13 09:43:50 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-13 09:43:50 +0000 |
commit | c55831a01dab548fdf9eccb7529396f6582c6637 (patch) | |
tree | 62443464b077d93289d0728dc9da9ef97326c14b | |
parent | ecd7877787a156e476e31b7108e7b9f15f7523d8 (diff) | |
download | clogger-c55831a01dab548fdf9eccb7529396f6582c6637.tar.gz |
Unlikely, but some app could pass '\0' into us
-rw-r--r-- | ext/clogger_ext/clogger.c | 2 |
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)) |