openpam_configure.c (236099) | openpam_configure.c (236124) |
---|---|
1/*- 2 * Copyright (c) 2001-2003 Networks Associates Technology, Inc. 3 * Copyright (c) 2004-2012 Dag-Erling Sm��rgrav 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by ThinkSec AS and 7 * Network Associates Laboratories, the Security Research Division of 8 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * | 1/*- 2 * Copyright (c) 2001-2003 Networks Associates Technology, Inc. 3 * Copyright (c) 2004-2012 Dag-Erling Sm��rgrav 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by ThinkSec AS and 7 * Network Associates Laboratories, the Security Research Division of 8 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * |
35 * $Id: openpam_configure.c 601 2012-04-14 20:37:45Z des $ | 35 * $Id: openpam_configure.c 612 2012-05-26 23:02:55Z des $ |
36 */ 37 38#ifdef HAVE_CONFIG_H 39# include "config.h" 40#endif 41 42#include <sys/param.h> 43 --- 212 unchanged lines hidden (view full) --- 256 * arguments. We could set this->optv = wordv + i, but 257 * then free(this->optv) wouldn't work. Instead, we free 258 * the words we've already consumed, shift the rest up, 259 * and clear the tail end of the array. 260 */ 261 this->optc = wordc - i; 262 for (i = 0; i < wordc - this->optc; ++i) { 263 FREE(wordv[i]); | 36 */ 37 38#ifdef HAVE_CONFIG_H 39# include "config.h" 40#endif 41 42#include <sys/param.h> 43 --- 212 unchanged lines hidden (view full) --- 256 * arguments. We could set this->optv = wordv + i, but 257 * then free(this->optv) wouldn't work. Instead, we free 258 * the words we've already consumed, shift the rest up, 259 * and clear the tail end of the array. 260 */ 261 this->optc = wordc - i; 262 for (i = 0; i < wordc - this->optc; ++i) { 263 FREE(wordv[i]); |
264 } 265 for (i = 0; i < this->optc; ++i) { |
|
264 wordv[i] = wordv[wordc - this->optc + i]; 265 wordv[wordc - this->optc + i] = NULL; 266 } 267 this->optv = wordv; 268 wordv = NULL; 269 wordc = 0; 270 271 /* hook it up */ --- 192 unchanged lines hidden --- | 266 wordv[i] = wordv[wordc - this->optc + i]; 267 wordv[wordc - this->optc + i] = NULL; 268 } 269 this->optv = wordv; 270 wordv = NULL; 271 wordc = 0; 272 273 /* hook it up */ --- 192 unchanged lines hidden --- |