Details Ticket 1249


Comment | Reply | Take | Open


Serial Number 1249
Subject m.proj2 - char *proj_name doesn't point to any memory
Area bug
Queue grass
Requestors egm2@jps.net
Owner none
Status resolved
Last User Contact Never contacted
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Mon Mar 31 09:30:03 2003 (5 yr ago)
Created Wed Aug 28 08:50:04 2002 (6 yr ago)

Transaction History Ticket 1249


Wed, Aug 28 2002 08:50:04    Request created by guest  
Subject: m.proj2 - char *proj_name doesn't point to any memory

Platform: GNU/Linux/i386
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 5.0 HEAD

The man page for m.proj2 describes it's arguments as name=..., but it really
gives preference to proj=...  That is, the abbreviation vs. the long name.  Furthermore,
there is a bug regarding the parsing of name=, where an attempt to sscanf(...,
"name=%s", proj_name) is made.  However, proj_name never points at any valid
memory, and "%s" splits on whitespace, so a name like 'Lambert Conformal Conic'
would be parsed as 'Lambert', iff there was memory allocated.  All in all, it's
not clear what's supposed to be going on with the "name" parameter when the abbreviated
"proj" is what is really wanted.  I changed proj_name to be NULL, which with
my C library means sprintf() just fails, and then the program exits with an error.
With other libraries, the program would probably crash.  IMHO, the program should
just use proj=<abbr> and be clear about it in the manual.

 On a related note, the parameter parsing also will generate two +proj=<foo>
for the argument list to the projection routines.  Doesn't really hurt anything...
Mon, Mar 31 2003 09:30:03    Status changed to resolved by egmiller  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request