Fix for potential memory corruption in RS when cardcount = 0

This bug is related to a previous workaround for a limitation in RS where
an allocation cannot have a size of 0.  Instead of creating the allocation,
it would set the allocation to null.

This workaround always allocates at least one card and adds a
shadow variable to indicate when the array is valid.

Also added checks for negative numbers.

Change-Id: Icc37f5da048b8177b93b05472a093f695e6ecc86
3 files changed
tree: a69074851eb2a5d655fca0929d8581060bde05d9
  1. carousel/
  2. common/
  3. CleanSpec.mk