From libsndfile documentation:
sf_count_t sf_readf_short (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
The file read frames functions fill the array pointed to by ptr with
the requested number of frames of data. The array must be large enough
to hold the product of frames and the number of channels.
Care must be taken to ensure that there is enough space in the array
pointed to by ptr, to take (frames * channels) number of items
(shorts, ints, floats or doubles).
readBlockSize
specify the number of frames, but you have to allocate memory for number of frames * number of channels.
I don't know how do you really allocate the tmpSignal
buffer, but you should do that with readBlockSize
* number of channels (presumably 2). (Or divide per 2 the number of frames specified to readBlockSize
call function).