I&#39;m really &quot;out&quot;, but if the &quot;size&quot; of the string can cause memory corruptions, so, maybe, the program have a &quot;limit&quot; to the size of the string, but is not checking if this limite is been observed...<br>

<br>If the code is in C or C++, probably you are writting after the size of the variable.<br><br>Like if I declare a variable as char name [5]<br><br>And then try to put &quot;PESCHEL&quot; in it.<br><br>If the program don&#39;t check this, you will write over memory that was not meant to.<br>

<br>Well.<br><br>Only an &quot;educated guess&quot; I think...<br><br><div class="gmail_quote">2010/8/19 Brian Peschel <span dir="ltr">&lt;<a href="mailto:brianp@occinc.com">brianp@occinc.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



  
    
  
  <div text="#000000" bgcolor="#ffffff">
    I have a simple DBF file I am trying to read<font color="#3333ff">:</font><br>
    <br>
    <tt>dBase Reader and Converter V. 0.8, (c) 2002 - 2003 by Bjoern
      Berg<br>
      <br>
      -- File statistics<br>
      dBase version.........:          FoxBase+/dBASE III+ (without
      memo)<br>
      Date of last update...:          1995-07-26<br>
      Number of records.....:          1414347 (001594cbd)<br>
      Length of header......:          97 (0061d)<br>
      Record length.........:          81 (0051d)<br>
      Columns in file.......:          2<br>
      Rows in file..........:          1414347<br>
      <br>
+---------------+-------+---------------+---------------+---------------+<br>
      | field name    | type  | field adress  | length        | field
      dec.    |<br>
+---------------+-------+---------------+---------------+---------------+<br>
      |           ID  |   N   |        0      |  10           |  
      0           |<br>
      |       String  |   C   |        0      |  70           |  
      0           |<br>
+---------------+-------+---------------+---------------+---------------+</tt><br>
    <br>
    I am seeing memory corruption in my program after reading this combo
    from the DBF.<br>
             ID:    1374067<br>
         String: UNITED STATES DEPARTMENT OF THE INTERIOR PATUXENT
    WILDLIFE RESEARCH CE<br>
    What makes this interesting is the string is 70 characters long
    (which is the width of the field).<br>
    <br>
    If I change the string in the DBF to:<br>
             ID:    1374067<br>
         String: US DEPT OF THE INTERIOR PATUXENT WILDLIFE RESEARCH
    CENTER<br>
    (which is 57 characters) I no longer have any memory corruption.<br>
    <br>
    I tries this on both 1.2.10 and 1.3.0b2.  Any ideas?<br>
    <br>
    - B<br>
  </div>

<br>_______________________________________________<br>
Shapelib mailing list<br>
<a href="mailto:Shapelib@lists.maptools.org">Shapelib@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/shapelib" target="_blank">http://lists.maptools.org/mailman/listinfo/shapelib</a><br>
<br></blockquote></div><br>