Pregunta

So I am trying to copy a string to the fuse buffer. When I try to call sizeof(buf) I get an error and my program crashes. My problem is that I believe I am reaching the maximum size of the fuse buffer because it is chopping off the last few characters. Is there anyway to change buf size from within my c file or does anyone know what the size of it is exactly? Thank you!

¿Fue útil?

Solución

Random guess: you're using sizeof buf where buf is just a pointer (probably passed to a function), and thus getting the size of the pointer instead of the size of the memory block the pointer is pointing at. You cannot get the latter using sizeof, you must pass it in a separate variable.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top