Menu

SetDoubleAttribute buffer too small

Developer
2008-09-05
2013-05-20
  • olivier barthelemy

    I'm using the last tinyxml lib in a project. At one point, i made a call to SetDoubleAttribute() with an uninitialized  value in the double argument, and got a 'Buffer too small' error. Changing the buffer size in the function from 256 to 512 chars solved the problem. One of the problematic values is 3711443205885392400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000. 
    This is what the
    TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );
    expression put in the buffer

     
    • Lee Thomason

      Lee Thomason - 2008-10-16

      Good bug catch. I'll patch that up in the next version. For future reference please file in the "bugs" section.

      thanks,
      lee

       

Log in to post a comment.

MongoDB Logo MongoDB