#429 closed defect (invalid)
need policy on signed vs unsigned unit allocations
| Reported by: | jhoblitt | Owned by: | eugene |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | IPP SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
We need to define a policy that forbids the following.
--
psBitSet* psBitSetAlloc(psS32 n)
{
psS32 numBytes = 0;
psBitSet* newObj = NULL;
if (n < 0) {
psError(PS_ERR_BAD_PARAMETER_VALUE, true,
PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE,
n);
return NULL;
}
.
.
--
I've changed the prototype in the SDRS to be unsigned but haven't added any
discussion about this issue as I believe we should do it 'globally' for the SDRS.
Change History (2)
comment:1 by , 21 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 by , 21 years ago
Note:
See TracTickets
for help on using tickets.

See the SDRS section "Negative allocations".