Fossil

Check-in [c3d09540]
Login

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

Overview
Comment:Call fossil_fatal() when fossil_fopen fail on commit_warning(). This fix SIGSEGV when converting CR/NL where files are read-only. (reported on ML)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c3d09540dd26883665bf856a6581b76a012034a7
User & Date: mgagnon 2014-04-02 03:30:02
Context
2014-04-02
06:55
Remove @FOSSIL_ENABLE_TCL@ references in Makefile*.in: It doesn't work when tcl is not enabled, and it has no function anyway because the definition in autoconfig.h is really what matters. check-in: d77b7ed1 user: jan.nijtmans tags: trunk
03:30
Call fossil_fatal() when fossil_fopen fail on commit_warning(). This fix SIGSEGV when converting CR/NL where files are read-only. (reported on ML) check-in: c3d09540 user: mgagnon tags: trunk
2014-04-01
22:28
Fix using the unary bitwise NOT operator in TH1. check-in: ee1aa460 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

1299
1300
1301
1302
1303
1304
1305



1306
1307
1308
1309
1310
1311
1312
      allOk = 1;
    }else if( *zConvert && (cReply=='c' || cReply=='C') ){
      char *zOrig = file_newname(zFilename, "original", 1);
      FILE *f;
      blob_write_to_file(p, zOrig);
      fossil_free(zOrig);
      f = fossil_fopen(zFilename, "wb");



      if( fUnicode ) {
        int bomSize;
        const unsigned char *bom = get_utf8_bom(&bomSize);
        fwrite(bom, 1, bomSize, f);
        blob_to_utf8_no_bom(p, 0);
      }
      if( fHasAnyCr ){







>
>
>







1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
      allOk = 1;
    }else if( *zConvert && (cReply=='c' || cReply=='C') ){
      char *zOrig = file_newname(zFilename, "original", 1);
      FILE *f;
      blob_write_to_file(p, zOrig);
      fossil_free(zOrig);
      f = fossil_fopen(zFilename, "wb");
      if( f==0 ){
        fossil_fatal("cannot open %s for writing", zFilename);
      }
      if( fUnicode ) {
        int bomSize;
        const unsigned char *bom = get_utf8_bom(&bomSize);
        fwrite(bom, 1, bomSize, f);
        blob_to_utf8_no_bom(p, 0);
      }
      if( fHasAnyCr ){