From 32fd4508bd018642f1ff82d8a6d59f21a81a9a5c Mon Sep 17 00:00:00 2001
From: David Hedbor <david@hedbor.org>
Date: Thu, 16 Jul 1998 23:19:50 -0700
Subject: [PATCH] Fixed a FMR (Free Memory Read) in f_everynth.

Rev: src/builtin_functions.c:1.116
---
 src/builtin_functions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/builtin_functions.c b/src/builtin_functions.c
index 877e0d5b67..b851016f18 100644
--- a/src/builtin_functions.c
+++ b/src/builtin_functions.c
@@ -4,7 +4,7 @@
 ||| See the files COPYING and DISCLAIMER for more information.
 \*/
 #include "global.h"
-RCSID("$Id: builtin_functions.c,v 1.115 1998/07/15 20:16:47 hubbe Exp $");
+RCSID("$Id: builtin_functions.c,v 1.116 1998/07/17 06:19:50 neotron Exp $");
 #include "interpret.h"
 #include "svalue.h"
 #include "pike_macros.h"
@@ -2864,8 +2864,8 @@ void f_everynth(INT32 args)
   for(k=0; start<size; start+=n)
     assign_svalue_no_free(a->item+(k++), ina->item+start);
 
-  pop_n_elems(args);
   a->type_field=ina->type_field;
+  pop_n_elems(args);
   push_array(a);
   return;
 }
-- 
GitLab