edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: edbrowse-dev@edbrowse.org
Subject: [edbrowse-dev] infinite loop
Date: Tue, 10 Sep 2019 04:13:11 -0400	[thread overview]
Message-ID: <20190810041311.eklhad@comcast.net> (raw)

This is so absurd that I just have to give up and move on to something else.

which contains this code, slightly cleaned up for readability.

            setCookie: function  (a, w1, w2, extra) {
                extra = extra || {};
                var w = w1 + '=' + w2;
                var c = 0;
                for (var i = 0, l = a['length']; i < l; i++) {
                    var e = a[i];
                    w += '; ' + e;
                    var f = a[e];
                    l = a['length'];
                    if (f !== !![]) {
                        w += '=' + f;
                extra['cookie'] = w;

Then invoked like this.

setCookie(['*'], 'counter', 1);

As long as it is called with a nonzero array, it pushes undefined onto the array forever,
incrementing l and i forever, an infinite loop.
Is it not?

Even if it wasn't, the code makes no sense.
c is set but not used.
The whol calculation puts cookie in a local object that is then thrown away.
I wonder if this site comes up in a real browser, and how it possibly could!
Maybe it's bogus untested code that we're not suppose to be running at all,
and other browsers don't run it but for some reason edbrowse does.
I don't know I'm sort of grasphing.
As I say I'll probably just write this one off for now unless you all have some insight.

Karl Dahlke

             reply	other threads:[~2019-09-10  8:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10  8:13 Karl Dahlke [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-27 14:51 [Edbrowse-dev] " Karl Dahlke
2017-01-27 12:43 Karl Dahlke
2014-02-20 15:01 Karl Dahlke
2014-02-20 20:25 ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190810041311.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=edbrowse-dev@edbrowse.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).