mirror of https://gerrit.osmocom.org/asn1c
memory OOB issue on Windows and with non-standard allocators; by Sheng Yu
This commit is contained in:
parent
7bb4ad0506
commit
b2bfca5313
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
0.9.22: 2007-Jun-29
|
0.9.22: 2008-Nov-19
|
||||||
|
|
||||||
* Added -pdu=all and -pdu=<type> switches to asn1c.
|
* Added -pdu=all and -pdu=<type> switches to asn1c.
|
||||||
* Added PER support for most known-multiplier string types:
|
* Added PER support for most known-multiplier string types:
|
||||||
|
@ -18,6 +18,9 @@
|
||||||
* Added DEFAULT handling for known multiplier string.
|
* Added DEFAULT handling for known multiplier string.
|
||||||
* Added a sample OMA ULP decoder (./examples/sample.source.ULP).
|
* Added a sample OMA ULP decoder (./examples/sample.source.ULP).
|
||||||
* Added full-width 32-bit integer encoding support in PER.
|
* Added full-width 32-bit integer encoding support in PER.
|
||||||
|
* Fixed 1-byte OOB write issue with non-standard and Windows
|
||||||
|
memory allocators (Severity: low; Security impact: medium).
|
||||||
|
Reported by Sheng Yu.
|
||||||
|
|
||||||
0.9.21: 2006-Sep-17
|
0.9.21: 2006-Sep-17
|
||||||
|
|
||||||
|
|
|
@ -868,8 +868,8 @@ asn_ulong2INTEGER(INTEGER_t *st, unsigned long value) {
|
||||||
|
|
||||||
end = buf + (sizeof(value) + 1);
|
end = buf + (sizeof(value) + 1);
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
for(b = buf, shr = (sizeof(long)-1)*8; b < end; shr -= 8)
|
for(b = buf + 1, shr = (sizeof(long)-1)*8; b < end; shr -= 8, b++)
|
||||||
*(++b) = (uint8_t)(value >> shr);
|
*b = (uint8_t)(value >> shr);
|
||||||
|
|
||||||
if(st->buf) FREEMEM(st->buf);
|
if(st->buf) FREEMEM(st->buf);
|
||||||
st->buf = buf;
|
st->buf = buf;
|
||||||
|
|
Loading…
Reference in New Issue