From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Description of problem: I just tried to compile package gphoto2-2_1_2-1 from Fedora. The compiler said casio-qv-commands.c(210): warning #175: subscript out of range The source code is int QVsetspeed (Camera *camera, QVSpeed speed) { unsigned char cmd[3]; cmd[0] = 'C'; cmd[1] = 'B'; cmd[3] = (unsigned char) speed; CR (QVsend (camera, cmd, 3, NULL, 0)); return (GP_OK); } This code is clearly wrong, by inspection. Suggest change line to cmd[ 2] = (unsigned char) speed; Version-Release number of selected component (if applicable): gphoto2-2_1_2-1 How reproducible: Always Steps to Reproduce: 1. by inspection 2. 3. Additional info:
It is far from clear that this is wrong. (Please report these kind of bugs upstream where possible; thanks.)
>It is far from clear that this is wrong. Let me be more clear. unsigned char cmd[3]; cmd[3] = (unsigned char) speed; Array bounds in C are exclusive. cmd[ 3] is not available. >(Please report these kind of bugs upstream where possible; thanks.) I've tried that - it didn't work. Would it be possible for you to report this bug for me, please ?
Oh I see what you mean. Your correction might well be wrong though, and it isn't clear whether the array should be larger or the values squashed together. I've reported it upstream.
I can confirm that this bug still exists in Fedora Core 3 Test 3. It hasn't been fixed in nearly a year.