I’m working on a project fuzzing a media player. I wrote the file generator in Java and converted the CRC generator from the original compression code written in C. I can write data fine with DataOutputStream, but I can’t figure out how to send the data as an unsigned character array in java. In C this is a very straightforward process. I have searched for a solution pretty thoroughly, and the best solution I’ve found is to just send the data to C and let C return a CRC. I may just not be searching correctly as I’m pretty unfamiliar with this stuff. Thank you very much for any help.
Share
You definitely want a byte[]. A ‘byte’ is equivalent to a signed char in C. Java’s ‘char’ is a 16-bit unicode value and not really equivalent at all.
If it’s for fuzzing, unless there’s something special about the CRC function you’re using, I imagine you could simply use: