bug-cgicc
[Top][All Lists]
Advanced

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

[bug-cgicc] auto_ptr<char> should not point char array


From: AIDA Shinra
Subject: [bug-cgicc] auto_ptr<char> should not point char array
Date: Tue, 22 Apr 2003 03:47:46 +0900
User-agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.4 MULE XEmacs/21.4 (patch 10) (Military Intelligence) (i386-unknown-freebsd4.7)

In CgiEnvironment.cpp and CgiUtils.cpp auto_ptr<char> point char array
allocated by new[]. Such a usage causes undefined behaviour and should
be changed.

Easiest solution:

vector<char> v(size);
foo(&v[0]);

This code is allowed after a recent correct of the standard.

BTW, what do copy construction, assignment and comparison of CgiInput
mean? How should derived classes behave? I can't imagine any
reasonable definition.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]