0

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!

Brandon Amir
  • 380
  • 1
  • 6
  • 16
  • Honestly? Are you also working on this without looking at the code? If not, how do you expect us to? – unwind Apr 25 '14 at 07:19
  • Sorry, I figured out this isn't actually my problem though now. The data is being lost somewhere else. Thank you though! – Brandon Amir Apr 25 '14 at 07:22

1 Answers1

1

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.

unwind
  • 391,730
  • 64
  • 469
  • 606