[sr-dev] git:master:7fad9c51: app_sqlang: fix squirrel warning: ‘nArgs’ may be used uninitialized in this function

Henning Westerholt hw at skalatan.de
Mon Nov 25 19:54:50 CET 2019


Hi Daniel,

Upstream issue: https://github.com/albertodemichelis/squirrel/issues/205

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
Kamailio Merchandising – https://skalatan.de/merchandising

From: Daniel-Constantin Mierla <miconda at gmail.com>
Sent: Monday, November 25, 2019 11:11 AM
To: Kamailio (SER) - Development Mailing List <sr-dev at lists.kamailio.org>; Henning Westerholt <hw at skalatan.de>
Subject: Re: git:master:7fad9c51: app_sqlang: fix squirrel warning: ‘nArgs’ may be used uninitialized in this function

Hello,

this change has to be pushed to the upstream project, otheriwse with the next sync it is going to be lost -- we do not maintain the code of squirrel interpreter, it is used as an embedded library. The project is at:

  * https://github.com/albertodemichelis/squirrel

Cheers,
Daniel

On 23.11.19 18:54, Henning Westerholt wrote:

Module: kamailio

Branch: master

Commit: 7fad9c51f71854e0649fe76e273190e4b4f82438

URL: https://github.com/kamailio/kamailio/commit/7fad9c51f71854e0649fe76e273190e4b4f82438



Author: Henning Westerholt <hw at skalatan.de><mailto:hw at skalatan.de>

Committer: Henning Westerholt <hw at skalatan.de><mailto:hw at skalatan.de>

Date: 2019-11-23T18:53:17+01:00



app_sqlang: fix squirrel warning: ‘nArgs’ may be used uninitialized in this function



---



Modified: src/modules/app_sqlang/squirrel/squirrel/sqbaselib.cpp



---



Diff:  https://github.com/kamailio/kamailio/commit/7fad9c51f71854e0649fe76e273190e4b4f82438.diff

Patch: https://github.com/kamailio/kamailio/commit/7fad9c51f71854e0649fe76e273190e4b4f82438.patch



---



diff --git a/src/modules/app_sqlang/squirrel/squirrel/sqbaselib.cpp b/src/modules/app_sqlang/squirrel/squirrel/sqbaselib.cpp

index f3b8103185..fb6545f921 100644

--- a/src/modules/app_sqlang/squirrel/squirrel/sqbaselib.cpp

+++ b/src/modules/app_sqlang/squirrel/squirrel/sqbaselib.cpp

@@ -625,7 +625,7 @@ static SQInteger __map_array(SQArray *dest,SQArray *src,HSQUIRRELVM v) {

     SQObject &closure = stack_get(v, 2);

     v->Push(closure);



-    SQInteger nArgs;

+    SQInteger nArgs = 0;

     if(sq_type(closure) == OT_CLOSURE) {

         nArgs = _closure(closure)->_function->_nparameters;

     }







_______________________________________________

Kamailio (SER) - Development Mailing List

sr-dev at lists.kamailio.org<mailto:sr-dev at lists.kamailio.org>

https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev



--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com<http://www.kamailioworld.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20191125/eddc8f8f/attachment.html>


More information about the sr-dev mailing list