Open
Bug 560133
Opened 15 years ago
Updated 3 years ago
dosprintf leaks nas on failure
Categories
(NSPR :: NSPR, defect)
NSPR
NSPR
Tracking
(Not tracked)
NEW
People
(Reporter: timeless, Unassigned)
References
()
Details
(Keywords: coverity)
Attachments
(1 file)
|
5.05 KB,
patch
|
Details | Diff | Splinter Review |
681 static int dosprintf(SprintfState *ss, const char *fmt, va_list ap)
699 struct NumArg* nas = NULL;
701 struct NumArg nasArray[ NAS_DEFAULT_NUM ];
711 nas = BuildArgArray( fmt, ap, &rv, nasArray );
718 while ((c = *fmt++) != 0) {
719 if (c != '%') {
720 rv = (*ss->stuff)(ss, fmt - 1, 1);
721 if (rv < 0) {
722 return rv;
734 if (c == '%') {
737 if (rv < 0) {
738 return rv;
827 switch (c) {
847 case 'X': /* unsigned HEX */
854 switch (type) {
883 case TYPE_UINT32:
887 if (rv < 0) {
888 return rv;
899 case TYPE_UINT64:
903 if (rv < 0) {
904 return rv;
913 case 'g':
925 if (rv < 0) {
926 return rv;
930 case 'c':
932 if ((flags & FLAG_LEFT) == 0) {
933 while (width-- > 1) {
935 if (rv < 0) {
936 return rv;
941 if (rv < 0) {
942 return rv;
944 if (flags & FLAG_LEFT) {
945 while (width-- > 1) {
947 if (rv < 0) {
948 return rv;
978 case 's':
981 if (rv < 0) {
982 return rv;
993 default:
999 if (rv < 0) {
1000 return rv;
1003 if (rv < 0) {
1004 return rv;
1012 if( nas && ( nas != nasArray ) ){
1013 PR_DELETE( nas );
Attachment #439856 -
Flags: review?(wtc)
Updated•3 years ago
|
Severity: minor → S4
Comment 2•3 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: wtc → nobody
You need to log in
before you can comment on or make changes to this bug.
Description
•