projects
/
users
/
c2main
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62e4827
)
Safe guard in case of imporper data is provided to elog()
author
Tatsuo Ishii
<ishii@postgresql.org>
Wed, 21 Feb 2001 06:05:23 +0000
(06:05 +0000)
committer
Tatsuo Ishii
<ishii@postgresql.org>
Wed, 21 Feb 2001 06:05:23 +0000
(06:05 +0000)
in multi-byte build.
src/backend/utils/error/elog.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/error/elog.c
b/src/backend/utils/error/elog.c
index 2434f4d21970110455e9dddbebd33de621c499b0..c19ad44d63b20d3d2623b2344144060a3fabe3ea 100644
(file)
--- a/
src/backend/utils/error/elog.c
+++ b/
src/backend/utils/error/elog.c
@@
-8,7
+8,7
@@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.8
0 2001/01/24 19:43:15 momjian
Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.8
1 2001/02/21 06:05:23 ishii
Exp $
*
*-------------------------------------------------------------------------
*/
@@
-683,6
+683,8
@@
write_syslog(int level, const char *line)
#ifdef MULTIBYTE
/* trim to multibyte letter boundary */
buflen = pg_mbcliplen(buf, l, l);
+ if (buflen <= 0)
+ return;
buf[buflen] = '\0';
l = strlen(buf);
#endif