The difference between
unsigned char* readbuff = "this is jni";
and
unsigned char readbuff[11] = "this is jni";
is the first one points to a string literal, which must not be modified. The second one is a local char array containing the same string, but the char array may be freely modified.
However, be aware that the array is too small by one character. It is missing space for the final NUL byte. If you want to have an array exactly as long as needed, you can say
unsigned char readbuff[] = "this is jni";
Update:
To do the same dynamically, you can do
void test(){
unsigned char* readbuff = malloc(256);
readData(readbuff);
}
But you must not forget to free
the memory eventually.