Menu

#2790 [puts] accepts invalid arguments

obsolete: 8.4.6
closed-fixed
5
2004-07-15
2004-07-06
No

To duplicate:

puts stdout "this is a test." ""

Please note the extra set of double quotes after the
string.

Line 105 of tclIOCmd.c is currently:

if (strncmp(arg, "nonewline", (size_t) length) != 0) {

I believe It SHOULD be:

if (length > 0 && strncmp(arg, "nonewline", (size_t)
length) != 0) {

Discussion

  • Donal K. Fellows

    • labels: --> 24. Channel Commands
    • milestone: --> obsolete: 8.4.6
    • assigned_to: nobody --> andreas_kupries
     
  • Joe Mistachkin

    Joe Mistachkin - 2004-07-06

    Logged In: YES
    user_id=113501

    Oops! What I meant to say was that the line should be:

    if (length == 0 || strncmp(arg, "nonewline", (size_t) length) !
    = 0) {

     
  • Andreas Kupries

    Andreas Kupries - 2004-07-15

    Logged In: YES
    user_id=75003

    Commited the fix to 8.4 and head. small modification:
    Checking for length != 9, to accept only "nonewline", and no
    abbreviation.

     
  • Andreas Kupries

    Andreas Kupries - 2004-07-15
    • status: open --> closed-fixed
     
MongoDB Logo MongoDB