Reply to post:

After reportedly dragging its feet, BlackBerry admits, yes, QNX in cars, equipment suffers from BadAlloc bug

Paul Crawford Silver badge

I normally use calloc() due to the zeroing of memory, so any use-before-initialisation has a repeatable fail.

However, to me it seems the issue really comes down to a lack of input sanitization if some external entity can fool you application in to a integer-fault situation.

If you did malloc(size*num) I guess you have the same problem unless 64-bit and you are happy for the system to grind to a halt as it allocates a brazillion bytes of memory and the swap kicks in...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2021