Commit 7d2ef0a
committed
prevent segfault caused by bitidx++
This patch modifies Adafruit_DHT_Driver/Adafruit_DHT.c so that the code
that increments `bitidx` without bound is protected by #ifdef DEBUG.
This prevents this code from generating a segfault if readDHT is called several
times (which will ultimately cause bitidx to increment beyond the end of the
bits array).
Resolves github issue adafruit#78.1 parent 99a2955 commit 7d2ef0a
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
0 commit comments