Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Aug 1998 12:59:54 +0300 (EEST)
From:      serg@bcs.zp.ua
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/7535: xfm's `magic' file parsing error
Message-ID:  <199808090959.MAA26553@bcs3.bcs.zp.ua>

next in thread | raw e-mail | index | archive | help

>Number:         7535
>Category:       ports
>Synopsis:       xfm incorrectly parses `magic' file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug  9 03:10:02 PDT 1998
>Last-Modified:
>Originator:     Sergey Shkonda
>Organization:
Business Computer Service
>Release:        FreeBSD 2.2.7-RELEASE i386, current
>Environment:

	

Description: 

	When parsing xfm magic file strtol() instead strtoul() used.
	
	<Precise description of the problem (multiple lines)>

>Description:
>How-To-Repeat:

	

Fix: 
	
	<How to correct or work around the problem, if known (multiple lines)>

*** ./src/magic.c.old	Tue Apr  4 15:42:51 1995
--- ./src/magic.c	Thu Nov 20 21:41:37 1997
***************
*** 227,233 ****
  	    default:
  		mtypes[count].flags |= M_EQ;
  	    }
! 	    mtypes[count].value.number = strtol(cptr, &cptr, 0);
  	}
  	while(isspace(*cptr))
  	    cptr++;
--- 227,233 ----
  	    default:
  		mtypes[count].flags |= M_EQ;
  	    }
! 	    mtypes[count].value.number = strtoul(cptr, &cptr, 0);
  	}
  	while(isspace(*cptr))
  	    cptr++;
>Fix:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808090959.MAA26553>