From: janhauer Date: Wed, 9 Apr 2008 08:56:30 +0000 (+0000) Subject: bugfix: the buffer passed to ReadStream.postBuffer() must have a certain minimum... X-Git-Tag: release_tinyos_2_1_0_0~468 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=b5a76b320071e88ab3168beb8b2b12b9ac64be04 bugfix: the buffer passed to ReadStream.postBuffer() must have a certain minimum size to store temporary information (this commit happens in agreement with David G.) --- diff --git a/tos/chips/atm128/adc/AdcStreamP.nc b/tos/chips/atm128/adc/AdcStreamP.nc index 9435c30f..6bc47bc1 100644 --- a/tos/chips/atm128/adc/AdcStreamP.nc +++ b/tos/chips/atm128/adc/AdcStreamP.nc @@ -104,6 +104,8 @@ implementation { } command error_t ReadStream.postBuffer[uint8_t c](uint16_t *buf, uint16_t n) { + if (n < sizeof(struct list_entry_t)) + return ESIZE; atomic { struct list_entry_t *newEntry = (struct list_entry_t *)buf;