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

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

[Octave-bug-tracker] [bug #46645] x.(string) doesn't validate that strin


From: Rik
Subject: [Octave-bug-tracker] [bug #46645] x.(string) doesn't validate that string is valid variable name
Date: Wed, 09 Dec 2015 20:16:34 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Update of bug #46645 (project octave):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #2:

Attached is a simple file (bad_struct.var) that contains a struct with a
single invalid field name.  When I try to load it I get the following.


load bad_struct.var 
error: load: bogus identifier '1A' found in file ''


First, there is a problem because the filename should be reported in the error
message.  I'll leave that aside for the time being.

Grep'ing for "bogus identifier" shows the only instance is in
corefcn/ls-oct-text.cc at line 254.


if (! (name == ".nargin." || name == ".nargout."
       || name == CELL_ELT_TAG || valid_identifier (name)))
  error ("load: bogus identifier '%s' found in file '%s'",
         name.c_str (), filename.c_str ());


If you like, we could delete the call to valid_identifier() and then
presumably the file would load.



(file #35680)
    _______________________________________________________

Additional Item Attachment:

File name: bad_struct.var                 Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46645>

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




reply via email to

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