Changeset 6472d772d6de63a64379d00f69533dd377597142

Show
Ignore:
Timestamp:
07/24/12 20:21:56 (2 years ago)
Author:
Phoebe Simon <phoebe.simon@rackspace.com>
git-committer:
Phoebe Simon <phoebe.simon@rackspace.com> 1343161316 -0700
git-parent:

[7feae5c70ec9640b60a0f4e8d9c749522254eeb6]

git-author:
Phoebe Simon <phoebe.simon@rackspace.com> 1343161316 -0700
Message:

lua_noit.c: Included check to ensure that addition does not overflow and the individual values are positive

Otherwise, could have resulted in remote execution or potential denial of service due to a server crash

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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;