octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #7964] Possible overflow in terminal buffe


From: Andre da Costa Barros
Subject: [Octave-patch-tracker] [patch #7964] Possible overflow in terminal buffer
Date: Tue, 05 Mar 2013 14:04:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0

URL:
  <http://savannah.gnu.org/patch/?7964>

                 Summary: Possible overflow in terminal buffer
                 Project: GNU Octave
            Submitted by: andrecbarros
            Submitted on: Tue 05 Mar 2013 02:04:04 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The possible offending code is displayed below with arrows to highlight where
trouble may arise.

  void SelfListener::run() {
->    char buf[4096];
      int len;
      bool running = true;
      while(running) {
           while((len = ::read(_a, buf, 4096)) > 0) {
->            buf[len] = 0; // Just in case.
              emit recvData(buf, len);
              msleep(30);
           }
           if(len < 0)
             running = false;
      }
  }






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 05 Mar 2013 02:04:04 PM GMT  Name: octave-buffer-overflow.patch 
Size: 389B   By: andrecbarros
buffer size padding
<http://savannah.gnu.org/patch/download.php?file_id=27568>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?7964>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]