Possible bugs
|
Some of these are minor, some issues may not actually exist. These have been found with CPPcheck. Fixed Fixed Fixed Fixed Fixed Fixed Fixed Fixed Fixed |
|
File removed |
|
You should probably provide links to the source lines in question as the code is frequently updated. |
|
Fixed – \BCM2835Dev\mixed\RiscOS\Sources\HWSupport\USB\USBDriver\build\c\ohcimodule Line 741 tok buffer is too small. - I’ll look into providing links |
|
I’ll get you started: mixed/RiscOS/Sources/HWSupport/USB/USBDriver/build/c/ohcimodule line 741 |
|
links added to original posts |
|
Removed from build Not a bug |
|
Are you sure? I’ve noticed with examining some of my own code that it can return some rather eccentric results. In this case it looks like the array index is always counted to be less than BUSCOUNT (which is the size of the array), once in a local loop, and once via a function. In this case, we have the code you linked to, and we have find_free_bus(). I can’t quote here as my phone badly messes up quoting; suffice to say that how ‘b’ gets to be 4 (which I presume is the value of BUSCOUNT) eludes me.
Yup. That one is a bug. If your array is 20 bytes, you don’t want a function that picks the smaller of the string length or 20, and pokes a terminull there, as array[20] means the elements go 0…19. ;-) |
|
Looking at the code again you are right bustable isn’t accessed at index 4 |
|
This depends. The array is 14 if not long names and 17 or so otherwise. The offending code looks to be in a code block “ |
|
That entire code block. uc is defined as 4 bytes, then several loops access it like… for (i=0; i<8; i++) I’m guessing uc ought to be eight bytes.
The memory leaks that I’ve looked at are the result of bombing out early because something went wrong after having allocated memory for the array, but not having freed it before returning zero… |
|
I think some more brackets are needed same here too : Do we need some {} here : fixed Fixed |
|
Hmm… You’d have thought that C would interpret that as |
|
given TextArea_DesktopColours = 1<<0 this simplifies to just ‘if (flags)’ is this what the programmer wanted ? |
|
fixed
Always evaluates to false :
|