~ubuntu-branches/ubuntu/trusty/expect/trusty

« back to all changes in this revision

Viewing changes to expect.c

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2013-11-04 08:28:43 UTC
  • mfrom: (16.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20131104082843-3cyhznaopt37hop3
Tags: 5.45-5
Added patch which replaces memcpy my memmove for copying possibly
overlapping memory area, thanks to Per Cederqvist (closes: #728663).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1094
1094
                        /* shift remaining elements down */
1095
1095
                        /* but only if there are any left */
1096
1096
                        if (i+1 != ecmd->ecd.count) {
1097
 
                                memcpy(&ecmd->ecd.cases[i],
 
1097
                                memmove(&ecmd->ecd.cases[i],
1098
1098
                                       &ecmd->ecd.cases[i+1],
1099
1099
                                        ((ecmd->ecd.count - i) - 1) * 
1100
1100
                                        sizeof(struct exp_cmd_descriptor *));