문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top