projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the infinite recursion when calling yaz_log_level_init as the first
[yaz-moved-to-github.git]
/
src
/
wrbuf.c
diff --git
a/src/wrbuf.c
b/src/wrbuf.c
index
0b92aea
..
bca1636
100644
(file)
--- a/
src/wrbuf.c
+++ b/
src/wrbuf.c
@@
-1,12
+1,13
@@
/*
/*
- * Copyright (c) 1995-2004, Index Data.
+ * Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: wrbuf.c,v 1.4 2004-03-20 07:02:23 adam Exp $
+ * $Id: wrbuf.c,v 1.7 2005-01-15 19:47:14 adam Exp $
*/
*/
-/*
- * Growing buffer for writing various stuff.
+/**
+ * \file wrbuf.c
+ * \brief Implements WRBUF (growing buffer)
*/
#if HAVE_CONFIG_H
*/
#if HAVE_CONFIG_H
@@
-89,6
+90,13
@@
int wrbuf_xmlputs_n(WRBUF b, const char *cp, int size)
{
while (--size >= 0)
{
{
while (--size >= 0)
{
+ /* only TAB,CR,LF of ASCII CTRL are allowed in XML 1.0! */
+ if (*cp >= 0 && *cp <= 31)
+ if (*cp != 9 && *cp != 10 && *cp != 13)
+ {
+ cp++; /* we silently ignore (delete) these.. */
+ continue;
+ }
switch(*cp)
{
case '<':
switch(*cp)
{
case '<':