apps/rehash.c:228: error: BUFFER_OVERRUN_L2
  Offset added: [0, 2147483646] Size: 2040 by call to `add_entry`.
Showing all 14 steps of the trace


apps/rehash.c:197:1: Array declaration
195.    * This can be -1 if bad filename, or an error count.
196.    */
197. > static int handle_symlink(const char *filename, const char *fullpath)
198.   {
199.       unsigned int hash = 0;

apps/rehash.c:228:12: Call
226.       linktarget[n] = 0;
227.   
228.       return add_entry(type, hash, linktarget, NULL, 0, id);
                  ^
229.   }
230.   

apps/rehash.c:129:1: Parameter `*filename`
  127.    * Process an entry; return number of errors.
  128.    */
  129. > static int add_entry(enum Type type, unsigned int hash, const char *filename,
  130.                         const unsigned char *digest, int need_symlink,
  131.                         unsigned short old_id)

apps/rehash.c:175:24: Call
  173.           *ep = nilhentry;
  174.           ep->old_id = ~0;
  175.           ep->filename = BUF_strdup(filename);
                                ^
  176.           if (bp->last_entry)
  177.               bp->last_entry->next = ep;

crypto/buffer/buf_str.c:73:1: Parameter `*str`
    71.   }
    72.   
    73. > char *BUF_strdup(const char *str)
    74.   {
    75.       if (str == NULL)

crypto/buffer/buf_str.c:77:12: Call
    75.       if (str == NULL)
    76.           return NULL;
    77.       return BUF_strndup(str, strlen(str));
                     ^
    78.   }
    79.   

crypto/buffer/buf_str.c:87:11: <Offset trace>
85.           return NULL;
86.   
87.       siz = BUF_strnlen(str, siz);
                ^
88.   
89.       if (siz >= INT_MAX)

crypto/buffer/buf_str.c:87:11: Call
      85.           return NULL;
      86.   
      87.       siz = BUF_strnlen(str, siz);
                      ^
      88.   
      89.       if (siz >= INT_MAX)

crypto/buffer/buf_str.c:64:1: Parameter `*str`
        62.   #include <openssl/buffer.h>
        63.   
        64. > size_t BUF_strnlen(const char *str, size_t maxlen)
        65.   {
        66.       const char *p;

crypto/buffer/buf_str.c:70:5: Assignment
        68.       for (p = str; maxlen-- != 0 && *p != '\0'; ++p) ;
        69.   
        70.       return p - str;
                  ^
        71.   }
        72.   

crypto/buffer/buf_str.c:87:5: Assignment
      85.           return NULL;
      86.   
      87.       siz = BUF_strnlen(str, siz);
                ^
      88.   
      89.       if (siz >= INT_MAX)

crypto/buffer/buf_str.c:80:1: <Length trace>
78.   }
79.   
80. > char *BUF_strndup(const char *str, size_t siz)
81.   {
82.       char *ret;

crypto/buffer/buf_str.c:80:1: Parameter `*str`
      78.   }
      79.   
      80. > char *BUF_strndup(const char *str, size_t siz)
      81.   {
      82.       char *ret;

crypto/buffer/buf_str.c:98:5: Array access: Offset added: [0, 2147483646] Size: 2040 by call to `add_entry` 
      96.       }
      97.   
      98.       memcpy(ret, str, siz);
                 ^
      99.       ret[siz] = '\0';
      100.   
