[Monetdb-developers] [Monetdb-pf-checkins] pathfinder/runtimeshredder.mx, Feb2010, 1.162, 1.162.2.1

Sjoerd Mullender sjoerd at acm.org
Fri Feb 19 11:04:53 CET 2010


I don't care how it is solved, but if the DTD can't be loaded, dtd is
NULL, and you cannot dereference NULL (in handle_externalSubset), so
there have to be checks to make sure that dtd isn't NULL before it is
dereferenced.  This was the easy way, but perhaps there are other ways.

On 2010-02-19 08:46, Jan Flokstra wrote:
> On Thursday 18 February 2010 21:00, Jan Rittinger wrote:
>> Hi Sjoerd,
>>
>> as far as I can remember we only use the DTD to resolve entities and id
>> references. So if no DTD is available an error is triggered, but the
>> document is still imported.
>>
>> Just my two cents...
>>
> 
> Hi Sjoerd and Jan,
> 
> This is correct. But when the shredder was built I also had a couple of 
> examples with DTD's which could not be found but where the document loaded 
> correct so we decided not to bailout and only print an error. Maybe this 
> solution is better,
> 
> Regards, Jan. 
> 
>> Jan
>>
>> On Feb 18, 2010, at 10:50, Sjoerd Mullender wrote:
>>> Update of /cvsroot/monetdb/pathfinder/runtime
>>> In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30011
>>>
>>> Modified Files:
>>>      Tag: Feb2010
>>> 	shredder.mx
>>> Log Message:
>>> If there is no DTD, I guess there is not much point continuing.
>>> Found by Coverity.
>>>
>>>
>>> Index: shredder.mx
>>> ===================================================================
>>> RCS file: /cvsroot/monetdb/pathfinder/runtime/shredder.mx,v
>>> retrieving revision 1.162
>>> retrieving revision 1.162.2.1
>>> diff -u -d -r1.162 -r1.162.2.1
>>> --- shredder.mx	7 Jan 2010 15:24:29 -0000	1.162
>>> +++ shredder.mx	18 Feb 2010 09:50:12 -0000	1.162.2.1
>>> @@ -1362,8 +1362,10 @@
>>>                 ctx->myDoc = xmlNewDoc(ctx->version);
>>>             }
>>>
>>> -            if (!dtd)
>>> +            if (!dtd) {
>>>                 GDKerror("shred_external_subset: problem with reading
>>> external DTD (\"%s\")\n", SystemID); +                BAILOUT(shredCtx);
>>> +            }
>>>
>>>             if (ctx->myDoc->extSubset) {
>>>                 stream_printf(GDKout, "!WARNING: double external subset
>>> (\"%s\") may cause problems.\n", SystemID);
>>>
>>>
>>> -------------------------------------------------------------------------
>>> ----- Download Intel® Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> _______________________________________________
>>> Monetdb-pf-checkins mailing list
>>> Monetdb-pf-checkins at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
> 
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers


-- 
Sjoerd Mullender

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 371 bytes
Desc: OpenPGP digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20100219/c47b1ac4/attachment.sig>


More information about the developers-list mailing list