Comment

Comment by eichin

At first glance I almost misread this as a different C crime, since the declarations aren't in scope... uint8_t dhm_p[2048]; and uint8_t *dhm_p = (...)malloc(2048); both make dhm_p a reasonable pointer to 2k bytes of storage and are totally suitable for that argument, but sizeof the first one is 2048 and sizeof the second one is 4 (or more likely 8 these days, but this is specifically code from an embedded web server so I can say 4 :-)

But no, the actual problem was so much less subtle.

parent eichin 4 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton