From: "Александр Берсенев" <bay@hackerdom.ru>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/autodep:master commit in: src/hook_lib/
Date: Tue, 31 Jan 2012 12:30:39 +0000 (UTC) [thread overview]
Message-ID: <f02db3217ea416cabafe2d65e4d03ed372c3bf0c.bay@gentoo> (raw)
commit: f02db3217ea416cabafe2d65e4d03ed372c3bf0c
Author: Alexander Bersenev <bay <AT> hackerdom <DOT> ru>
AuthorDate: Tue Jan 31 12:30:20 2012 +0000
Commit: Александр Берсенев <bay <AT> hackerdom <DOT> ru>
CommitDate: Tue Jan 31 12:30:20 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/autodep.git;a=commit;h=f02db321
fixed crashes in ruby's rb_thread_blocking_region(). Shrink buffer for proc entrys
---
src/hook_lib/file_hook.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/hook_lib/file_hook.c b/src/hook_lib/file_hook.c
index 728ab4e..cd3850a 100644
--- a/src/hook_lib/file_hook.c
+++ b/src/hook_lib/file_hook.c
@@ -22,6 +22,7 @@
#include <sys/un.h>
#define MAXPATHLEN PATH_MAX
+#define MAXPROCPATHLEN 512
#define MAXSOCKETPATHLEN 108
#define MAXFILEBUFFLEN 2048
@@ -292,9 +293,9 @@ static char * __get_stage(){
* Get full path by fd
*/
ssize_t __get_path_by_fd(int fd, char *output, int output_len) {
- char path_to_fd_link[MAXPATHLEN];
+ char path_to_fd_link[MAXPROCPATHLEN];
- snprintf(path_to_fd_link,MAXPATHLEN,"/proc/self/fd/%d",fd);
+ snprintf(path_to_fd_link,MAXPROCPATHLEN,"/proc/self/fd/%d",fd);
ssize_t bytes_num=readlink(path_to_fd_link,output,output_len-1);
output[bytes_num]=0; // because readlink don't do this
if(output[0]!='/') return -1; // some odd string like pipe:
next reply other threads:[~2012-01-31 12:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 12:30 Александр Берсенев [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-11 20:56 [gentoo-commits] proj/autodep:master commit in: src/hook_lib/ Александр Берсенев
2011-10-21 4:45 Александр Берсенев
2011-09-30 7:21 Александр Берсенев
2011-08-21 18:50 Александр Берсенев
2011-08-16 7:31 Александр Берсенев
2011-08-02 20:19 Александр Берсенев
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f02db3217ea416cabafe2d65e4d03ed372c3bf0c.bay@gentoo \
--to=bay@hackerdom.ru \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox