c
<   for (i = 0; i < size;)
---
>   if (size > 0) {
>       for (i = 0; i < size;)
