git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a80531a
)
- IL_ERR_MSG_LEN = 1024
author
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 30 Nov 2006 11:04:32 +0000
(11:04 +0000)
committer
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 30 Nov 2006 11:04:32 +0000
(11:04 +0000)
- always terminate the error string to aviod appending garbage
org.glite.lb.logger/src/il_error.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.logger/src/il_error.c
b/org.glite.lb.logger/src/il_error.c
index
95bee1b
..
a13af21
100644
(file)
--- a/
org.glite.lb.logger/src/il_error.c
+++ b/
org.glite.lb.logger/src/il_error.c
@@
-20,7
+20,7
@@
extern int log_level;
static pthread_key_t err_key;
-static int IL_ERR_MSG_LEN = 1
28
;
+static int IL_ERR_MSG_LEN = 1
024
;
static
void
@@
-133,6
+133,8
@@
set_error(int code, long minor, char *msg)
strncpy(err->msg, msg, IL_ERR_MSG_LEN);
}
+ err->msg[IL_ERR_MSG_LEN] = 0; /* OK, malloc()ed IL_ERR_MSG_LEN + 1 */
+
return(code);
}