Changeset 34122


Ignore:
Timestamp:
04/23/15 11:01:52 (9 years ago)
Author:
gost
Message:

[titan] check for NULL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/sock.h

    r32432 r34122  
    746746                        {
    747747                                buf = realloc(buf, count);
    748                                 memcpy(buf, tmpbuf, count);
     748                                if(buf != NULL)
     749                                        memcpy(buf, tmpbuf, count);
    749750                        }
    750751                }
     
    802803                        count = count + ret;
    803804                        buf = realloc(buf, count);
    804                         memcpy(buf + count - ret, tmpbuf, ret);
     805                        if(buf != NULL)
     806                                memcpy(buf + count - ret, tmpbuf, ret);
    805807                }
    806808                memset(tmpbuf, 0, ret);
Note: See TracChangeset for help on using the changeset viewer.