diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-07-03 00:20:19 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-10-12 19:24:34 +0200 |
commit | 15c8ae9a828aebd9ffede30ba5f6e7d5dc7db01b (patch) | |
tree | 28e808e3e813914561be6c7e9d9d32b44a0ae358 /librt/shm.c | |
parent | d07b0ffce73e0218195f48ce62bde52a4ede25c6 (diff) | |
download | uClibc-alpine-15c8ae9a828aebd9ffede30ba5f6e7d5dc7db01b.tar.bz2 uClibc-alpine-15c8ae9a828aebd9ffede30ba5f6e7d5dc7db01b.tar.xz |
add testcases for shm_{open,unlink}
Reported-by: Mikael Lund Jepsen <mlj@iccc.dk>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'librt/shm.c')
-rw-r--r-- | librt/shm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/librt/shm.c b/librt/shm.c index 3f33d68af..c7c0ee461 100644 --- a/librt/shm.c +++ b/librt/shm.c @@ -45,6 +45,10 @@ static char* get_shm_name(const char*name) if (i < 0) { free(path); return NULL; + } else if (i >= NAME_MAX) { + free(path); + __set_errno(ENAMETOOLONG); + return NULL; } #endif return path; |