Fossil

Check-in [06e9863cb0]
Login

Check-in [06e9863cb0]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change strcpy() to memcpy() inside diff.c to avoid compiler warnings on OpenBSD.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 06e9863cb093ee72990aff0fe2909ff1463be0ad
User & Date: drh 2011-10-20 14:50:30.161
Context
2011-10-20
15:07
pulled in changelog 1.20. ... (check-in: 2e43ff6f7f user: stephan tags: trunk)
14:50
Change strcpy() to memcpy() inside diff.c to avoid compiler warnings on OpenBSD. ... (check-in: 06e9863cb0 user: drh tags: trunk)
14:01
Bug fix: Make sure the constant_time_cmp() SQL function is registered when rendering the login page. ... (check-in: 2f4a101ca5 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/diff.c.
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
** line length limit.
*/
static char *copylimline(char *out, DLine *dl, int lim){
  int len;
  len = dl->h & LENGTH_MASK;
  if( lim && len > lim ){
    memcpy(out, dl->z, lim-3);
    strcpy(&out[lim-3], "...");
  }else{
    memcpy(out, dl->z, len);
    out[len] = '\0';
  }
  return out;
}








|







586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
** line length limit.
*/
static char *copylimline(char *out, DLine *dl, int lim){
  int len;
  len = dl->h & LENGTH_MASK;
  if( lim && len > lim ){
    memcpy(out, dl->z, lim-3);
    memcpy(&out[lim-3], "...", 4);
  }else{
    memcpy(out, dl->z, len);
    out[len] = '\0';
  }
  return out;
}