Null terminate octet aligned records
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 29 Apr 2003 10:51:23 +0000 (10:51 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 29 Apr 2003 10:51:23 +0000 (10:51 +0000)
debian/changelog
debian/control
ir-tcl.c

index b3bc8bc..879701b 100644 (file)
@@ -1,14 +1,20 @@
+ir-tcl (1.4.1-3) unstable; urgency=low
+
+  * Updated for YAZ 2.0.2 (new Debian package layout).
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Tue, 29 Apr 2003 12:50:08 +0100
+
 ir-tcl (1.4.1-2) unstable; urgency=low
 
   * New package in order to avoid libxml2 high version.
 
- -- Adam Dickmeiss <adam@indexdata.dk>  Fri, 28 Sep 2003 10:58:00 +0100
+ -- Adam Dickmeiss <adam@indexdata.dk>  Fri, 28 Sep 2002 10:58:00 +0100
 
 ir-tcl (1.4.1-1) unstable; urgency=low
 
   * Upstream.
 
- -- Adam Dickmeiss <adam@indexdata.dk>  Sun, 24 Sep 2003 00:11:03 +0100
+ -- Adam Dickmeiss <adam@indexdata.dk>  Sun, 24 Sep 2002 00:11:03 +0100
 
 ir-tcl (1.4-1) unstable; urgency=low
 
index dc8e1dd..29d85cc 100644 (file)
@@ -1,12 +1,12 @@
 Source: ir-tcl
-Standards-Version: 2.5.0.0
+Standards-Version: 3.5.9.0
 Maintainer: Adam Dickmeiss <adam@indexdata.dk>
 Priority: extra
-Build-Depends: yaz-devel (>= 1.9), tcl8.3-dev
+Build-Depends: libyaz-dev (>= 2.0.2), tcl8.3-dev
 
 Package: ir-tcl-doc
 Section: doc
-Architecture: any
+Architecture: all
 Recommends: ir-tcl
 Description: Documentation for the IR Tcl.
  IR Tcl is a extension for Tcl that offers a Z39.50 client functionality.
index 881f428..a94656b 100644 (file)
--- a/ir-tcl.c
+++ b/ir-tcl.c
@@ -4,7 +4,10 @@
  * See the file LICENSE for details.
  *
  * $Log: ir-tcl.c,v $
- * Revision 1.124  2003-03-05 22:02:47  adam
+ * Revision 1.125  2003-04-29 10:51:23  adam
+ * Null terminate octet aligned records
+ *
+ * Revision 1.124  2003/03/05 22:02:47  adam
  * Add Tcl_InitStubs
  *
  * Revision 1.123  2003/03/05 21:21:41  adam
@@ -4075,8 +4078,11 @@ static void ir_handleDBRecord (IrTcl_Obj *p, IrTcl_RecordList *rl,
         if (oe->which == Z_External_octet && rl->u.dbrec.size > 0)
         {
             char *buf = (char*) oe->u.octet_aligned->buf;
-            if ((rl->u.dbrec.buf = ir_tcl_malloc (rl->u.dbrec.size)))
+            if ((rl->u.dbrec.buf = ir_tcl_malloc (rl->u.dbrec.size+1)))
+           {
                 memcpy (rl->u.dbrec.buf, buf, rl->u.dbrec.size);
+                rl->u.dbrec.buf[rl->u.dbrec.size] = '\0';
+           }
         }
         else if (rl->u.dbrec.type == VAL_SUTRS && 
                  oe->which == Z_External_sutrs)