diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-04-18 22:32:59 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-04-18 23:09:18 +0200 |
commit | d1ce35d2271ac8b79cb5e37677b1a989749e611c (patch) | |
tree | cafccb161304bf0f00320c4cc0e5966b8e8f6a39 /rts/RtsFlags.c | |
parent | 350ffc3e4c6b3aefd6ae621991564cc28f585d46 (diff) | |
download | haskell-d1ce35d2271ac8b79cb5e37677b1a989749e611c.tar.gz |
rts: Don't use strndup
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2125
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r-- | rts/RtsFlags.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 9db3cd4786..bffb1287e5 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -1597,7 +1597,7 @@ static rtsBool read_heap_profiling_flag(const char *arg_in) if (!right) right = arg + strlen(arg); - char *selector = strndup(left, right - left); + char *selector = stgStrndup(left, right - left + 1); switch (arg[2]) { case 'c': // cost centre label select |