Changeset 877


Ignore:
Timestamp:
Oct 5, 2006, 11:47:22 PM (13 years ago)
Author:
andree
Message:

Use strncpy() instead of strcpy() in popup_with_buttons() to avoid
segmentation fault for too long texts. Shorten text for pop-up about
CD writer device accordingly.

Also addresses Debian bug #391127.

Location:
branches/stable/mondo/mondo/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-devices.c

    r820 r877  
    19621962            if (bkpinfo->media_device[0]) {
    19631963                sprintf(tmp,
    1964                         "I think I've found your %s burner at SCSI node %s; am I right on the money? (Say no if you have an IDE burner and you are running a 2.6 kernel. Instead, specify the IDE burner's /dev address at the next screen.)",
     1964                        "I think I've found your %s burner at SCSI node %s. Is this correct? (Say no if you have an IDE burner and you are running a 2.6 kernel. You will then be prompted for further details.)",
    19651965                        media_descriptor_string(bkpinfo->
    19661966                                                backup_media_type),
  • branches/stable/mondo/mondo/common/newt-specific.c

    r797 r877  
    927927        }
    928928
    929         strcpy(prompt, p);
     929        strncpy(prompt, p, MAX_NEWT_COMMENT_LEN - 1);
     930        prompt[MAX_NEWT_COMMENT_LEN] = '\0';
    930931        text = newtTextboxReflowed(1, 1, prompt, 40, 5, 5, 0);
    931932        b_1 =
Note: See TracChangeset for help on using the changeset viewer.