~ubuntu-branches/ubuntu/utopic/freerdp/utopic

« back to all changes in this revision

Viewing changes to libfreerdp-utils/stream.c

  • Committer: Package Import Robot
  • Author(s): Otavio Salvador, Jeremy Bicha
  • Date: 2012-02-11 10:34:05 UTC
  • mfrom: (1.1.7) (9.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20120211103405-mk0gjhjn70eeyxul
Tags: 1.0.1-1
[ Jeremy Bicha ]
* New upstream release. Closes: #659332.
* Updated symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        original_size = stream->size;
66
66
        increased_size = (request_size > original_size ? request_size : original_size);
67
67
        stream->size += increased_size;
68
 
        stream->data = (uint8*) xrealloc(stream->data, stream->size);
 
68
 
 
69
        if (original_size == 0)
 
70
                stream->data = (uint8*) xmalloc(stream->size);
 
71
        else
 
72
                stream->data = (uint8*) xrealloc(stream->data, stream->size);
 
73
 
69
74
        memset(stream->data + original_size, 0, increased_size);
70
75
        stream_set_pos(stream, pos);
71
76
}