[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #VDB-194419]: LDM 6.4.6 crash



Hi Harry,

> With verbose logging on, ldm 6.4.6 can crash due to "%" in the product key
> causing the call of vsnprintf in vulog to fail.  Here is an example product 
> key
> from 12/17 at 0207 UTC:
> 
> 12155 20061217020708.066 CONDUIT 169
> data/nccf/com/nam/prod/nam.20061217/nam.t00z.awip1227.tm00.grib2
> !grib2/ncep/NAM_84/#000/200612170000F027/CPRXX%n|+/0 - NONE! 000169
> 
> vsnprintf sees the %n and expects an argument that does not exist, causing a
> segmentation fault.  The fix will be either:
> 
> 1. Prohibit "%" in the product key, or
> 2. Before printing the product key change all "%" to "%%".

Thanks for reporting this.

There's actually a third option: have the ulog(3) module print messages
using "%s" as the format string rather than using the message, itself,
as the format string (which should have been done from the beginning).

I've implemented this solution.  It's available at
<ftp://ftp.unidata.ucar.edu/pub/ldm/beta/ldm-6.4.7.4.tar.Z>.  Please
let me know what you think.

> Dr. Harry Edmon                       E-MAIL: address@hidden
> 206-543-0547                          address@hidden
> Dept of Atmospheric Sciences          FAX:    206-543-0308
> University of Washington, Box 351640, Seattle, WA 98195-1640

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: VDB-194419
Department: Support LDM
Priority: Normal
Status: Closed