IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#345 closed defect (fixed)

psDBPackRow() incorrectly handles most "META" types

Reported by: jhoblitt Owned by: aaron.culliney@…
Priority: high Milestone:
Component: astro Version: 0.5.0
Severity: normal Keywords:
Cc:

Description

1) we are not planning to store 'globs' of binary data (at this point) in the
database. Support for everything other then PS_META_STR should be removed from
this section.

2) non-string types have strlen() called on them, see 1

3) non-string types are tested to see if they are null by comparing them to '\0'
instead of 'NULL', see 1

} else if ((item->type == PS_META_STR)
(item->type ==
PS_META_VEC)
(item->type == PS_META_IMG)
(item->type ==
PS_META_HASH)
(item->type == PS_META_LOOKUPTABLE)
(item->type ==
PS_META_JPEG)
(item->type == PS_META_PNG)
(item->type ==
PS_META_ASTROM)
(item->type == PS_META_UNKNOWN)
(item->type ==

PS_TYPE_PTR)) {

bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V);

bind[i].length = &bind[i].buffer_length;

bind[i].buffer = item->data.V;
bind[i].is_null = *(char *)item->data.V == '\0'

? (my_bool *)&isNull
: NULL;

Change History (5)

comment:1 by robert.desonia@…, 21 years ago

Owner: changed from robert.desonia@… to aaron.culliney@…

comment:2 by aaron.culliney@…, 21 years ago

Resolution: fixed
Status: newclosed

I believe this is now fixed.

comment:3 by jhoblitt, 21 years ago

Verified by source inspection. Thanks.

comment:4 by jhoblitt, 21 years ago

Keywords: VERIFIED added

comment:5 by Paul Price, 20 years ago

Keywords: VERIFIED removed

Bugs have been fixed... closing.

Note: See TracTickets for help on using tickets.