SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: buffer overflow

  1. #1
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    buffer overflow

    Stack Overflow::/

    Code:
    window.onload = function() {
    alert(isConstructor(window.onload()))
    }



    I get this error on ie6, the is isConstructor function appears undefined in Mozilla. Anyone else get this error?

  2. #2
    SitePoint Addict
    Join Date
    Mar 2002
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does it in IE 5.5 but I've no idea why - sorry.

    Nick
    All4YourPC for all your PC needs. Custom software.
    Websites. Web marketing. Training.
    http://members.aol.com/nickjc67

  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nickc
    Does it in IE 5.5 but I've no idea why - sorry.

    Nick
    Heres another, that I was just messing about with[img]images/smilies/tongue.gif[/img]
    I know this is an illogical function, but it does make you wonder about the implementation of JScript in Internet Explorer.

    Yet again this returns a stack overflow[img]images/smilies/FRlol.gif[/img].
    Code:
      function init() { //constructor
    	if ( init() in this ) {
    	  delete this.init();
    	  alert( init() in this );
    	}
      }

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stack overflow? Maybe that's because you keep calling the function [img]images/smilies/rolleyes.gif[/img]
    Code:
    window.onload = function() { 
     alert(isConstructor(window.onload()))
    } 
    fix
    Code:
    window.onload = function() { 
     alert(isConstructor(window.onload))
    } 
    Besides - isConstructor() isn't a function anyways

    Same with this one
    Code:
    function init() { //constructor
     if ( init() in this ) {
      delete this.init();
      alert( init() in this );
     }
    }
    fix
    Code:
    function init() { //constructor
     if ( 'init' in this ) {
      delete this.init;
      alert( 'init' in this );
     }
    }
    But that doesn't make much sense now - does it? [img]images/smilies/goof.gif[/img]
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •