IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 20 years ago

Last modified 20 years ago

#610 closed defect (fixed)

getToken in psTime.c can walk off the end of the string

Reported by: rhl@… Owned by: David.Robbins@…
Priority: high Milestone:
Component: astro Version: 0.8.0
Severity: normal Keywords:
Cc:

Description

In psTime.c, getToken can walk off the end of the string as it fails to look to see if it's got
to the NUL before incrementing past the token. E.g.

psTime *t = psTimeGetNow(PS_TIME_UTC); psTimeToLMST(t, 75*M_PI/180);

[I hope that's right; translated from python -- but you get the point]. The other two static
definitions of "getToken" don't seem to have this problem.

* psTime.c~ Tue Oct 4 23:51:41 2005
--- psTime.c Tue Nov 29 18:48:45 2005
*
* 144,150

cleanToken = cleanString(*inString, sLen);

Move to end of token

! (*inString) += (sLen+1);

} else if(inString!='\0' && sLen==0) {

*status = PS_PARSE_ERROR_GENERAL;

--- 144,153 ----

cleanToken = cleanString(*inString, sLen);

Move to end of token

! (*inString) += sLen;
! if (inString != '\0') {
! (*inString)++;
! }

} else if(inString!='\0' && sLen==0) {

*status = PS_PARSE_ERROR_GENERAL;

Change History (9)

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

Status: newassigned

comment:2 by robert.desonia@…, 20 years ago

Owner: changed from robert.desonia@… to gusciora@…
Status: assignednew

comment:3 by gusciora@…, 20 years ago

Owner: changed from gusciora@… to David.Robbins@…

comment:4 by jhoblitt, 20 years ago

Cc: eugene@… added

comment:5 by jhoblitt, 20 years ago

* Bug 710 has been marked as a duplicate of this bug. *

comment:6 by jhoblitt, 20 years ago

blocked: 717

comment:7 by David.Robbins@…, 20 years ago

Resolution: fixed
Status: newclosed

Made desired changes.

comment:8 by Paul Price, 20 years ago

Keywords: VERIFIED added

Bug has been resolved.... closing.

comment:9 by Paul Price, 20 years ago

Keywords: VERIFIED removed

Bugs have been fixed... closing.

Note: See TracTickets for help on using tickets.