[Top][All Lists]
[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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-cgicc] auto_ptr<char> should not point char array,
AIDA Shinra <=