Changeset 7ddbf80ff0d1b6e8c6404f9016d7faef0b7ad019

Show
Ignore:
Timestamp:
07/25/12 19:19:33 (2 years ago)
Author:
Theo Schlossnagle <jesus@lethargy.org>
git-committer:
Theo Schlossnagle <jesus@lethargy.org> 1343243973 -0700
git-parent:

[61e91d7ff4f237358b7fb315cda4b370061326f0], [6472d772d6de63a64379d00f69533dd377597142]

git-author:
Theo Schlossnagle <jesus@lethargy.org> 1343243973 -0700
Message:

Merge pull request #90 from phoebesimon/master

Initialize previously uninitialized buffer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/lua_dns.c

    rc7cb270 r7feae5c  
    3838#include <unistd.h> 
    3939#include <ctype.h> 
     40#include <string.h> 
    4041#include <netinet/in.h> 
    4142#include <arpa/inet.h> 
     
    276277    const unsigned char *tmp; 
    277278 
     279    memset(buff, 0, sizeof(buff)); 
     280 
    278281    if (!dns_dnequal(dn, rr.dnsrr_dn)) continue; 
    279282    if ((dlc->query_ctype == DNS_C_ANY || dlc->query_ctype == rr.dnsrr_cls) && 
  • src/modules/lua_noit.c

    rf800a3f r6472d77  
    122122  int newsize = 0; 
    123123  char *newbuf; 
     124 
     125  if (cl->inbuff_len < 0 || l < 0) { 
     126    noitL(nldeb, "Invalid Argument: An argument was negative"); 
     127    abort(); 
     128  } 
     129  if (cl->inbuff_len + l < 0) { 
     130    noitL(nldeb, "Error: Addition Overflow"); 
     131    abort(); 
     132  } 
     133 
    124134  if(cl->inbuff_len + l > cl->inbuff_allocd) 
    125135    newsize = cl->inbuff_len + l;