Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch panic-reduction Excluding Merge-Ins
This is equivalent to a diff from 19f4b064ac to 79be1156a9
|
2021-03-31
| ||
| 12:42 | Merge reduction of fossil_panic() calls, for cleaner abnormal exits. check-in: 31c7bdb80b user: larrybr tags: trunk | |
| 10:57 | Sync w/trunk. Closed-Leaf check-in: 79be1156a9 user: larrybr tags: panic-reduction | |
|
2021-03-28
| ||
| 05:14 | Add example of fossil timeline + diff to get changes between specific versions check-in: 19f4b064ac user: danshearer tags: trunk | |
|
2021-03-27
| ||
| 16:04 | /chat: removed the unused/unnecessary jump-to-top/bottom buttons. check-in: a044fea785 user: stephan tags: trunk | |
|
2021-03-26
| ||
| 17:53 | Merge from trunk tip. check-in: 6e1cee191d user: larrybr tags: panic-reduction | |
Changes to src/bundle.c.
| ︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - + - + |
char *zErrMsg = 0;
char *zSql;
if( !doInit && file_size(zFile, ExtFILE)<0 ){
fossil_fatal("no such file: %s", zFile);
}
assert( g.db );
zSql = sqlite3_mprintf("ATTACH %Q AS %Q", zFile, zBName);
|
| ︙ |
Changes to src/cgi.c.
| ︙ | |||
1834 1835 1836 1837 1838 1839 1840 | 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 | - + |
#endif
if( zIpAddr ){
if( nCycles==0 ){
cgi_setenv("REMOTE_ADDR", zIpAddr);
g.zIpAddr = fossil_strdup(zIpAddr);
}
}else{
|
| ︙ |
Changes to src/db.c.
| ︙ | |||
454 455 456 457 458 459 460 | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | - + - + |
if( db.nProtect<1 ){
fossil_panic("too many db_protect_pop() calls");
}
db.protectMask = db.aProtect[--db.nProtect];
}
/*
|
| ︙ | |||
1832 1833 1834 1835 1836 1837 1838 | 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 | - + |
return mprintf("%s/fossil.db", zXdgHome);
}
/* The HOME variable is required in order to continue.
*/
if( zHome==0 ){
if( isOptional ) return 0;
|
| ︙ | |||
1882 1883 1884 1885 1886 1887 1888 | 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 | - + - + |
if( file_isdir(zHome, ExtFILE)==0 ){
file_mkdir(zHome, ExtFILE, 0);
}
rc = file_access(zHome, W_OK);
fossil_free(zHome);
if( rc ){
if( isOptional ) return 0;
|
| ︙ |
Changes to src/file.c.
| ︙ | |||
384 385 386 387 388 389 390 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - + - + |
**
** If a problem is found, print a warning message (using fossil_warning())
** and return non-zero. If everything is ok, return zero.
*/
int file_unsafe_in_tree_path(const char *zFile){
int n;
if( !file_is_absolute_path(zFile) ){
|
| ︙ | |||
1146 1147 1148 1149 1150 1151 1152 | 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | - + - + |
nBuf = sizeof(zTemp);
}
#ifdef _WIN32
win32_getcwd(zBuf, nBuf);
#else
if( getcwd(zBuf, nBuf-1)==0 ){
if( errno==ERANGE ){
|
| ︙ | |||
1821 1822 1823 1824 1825 1826 1827 | 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 | - + |
}
if( nBasis==0 ){
nBasis = 6;
zBasis = "fossil";
}
do{
blob_zero(pBuf);
|
| ︙ |
Changes to src/http_ssl.c.
| ︙ | |||
114 115 116 117 118 119 120 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + - + - + |
if( zCaSetting==0 || zCaSetting[0]=='\0' ){
/* CA location not specified, use platform's default certificate store */
X509_STORE_set_default_paths(SSL_CTX_get_cert_store(sslCtx));
}else{
/* User has specified a CA location, make sure it exists and use it */
switch( file_isdir(zCaSetting, ExtFILE) ){
case 0: { /* doesn't exist */
|
| ︙ |
Changes to src/http_transport.c.
| ︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + - + |
zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
blob_append_escaped_arg(&zCmd, zHost);
fossil_free(zHost);
}else{
blob_append_escaped_arg(&zCmd, pUrlData->name);
}
if( !is_safe_fossil_command(pUrlData->fossil) ){
|
| ︙ | |||
179 180 181 182 183 184 185 | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | - + |
sqlite3_randomness(sizeof(iRandId), &iRandId);
transport.zOutFile = mprintf("%s-%llu-out.http",
g.zRepositoryName, iRandId);
transport.zInFile = mprintf("%s-%llu-in.http",
g.zRepositoryName, iRandId);
transport.pFile = fossil_fopen(transport.zOutFile, "wb");
if( transport.pFile==0 ){
|
| ︙ |
Changes to src/import.c.
| ︙ | |||
634 635 636 637 638 639 640 | 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | - + |
fossil_free(gg.aData); gg.aData = 0;
gg.nData = atoi(&zLine[5]);
if( gg.nData ){
int got;
gg.aData = fossil_malloc( gg.nData+1 );
got = fread(gg.aData, 1, gg.nData, pIn);
if( got!=gg.nData ){
|
| ︙ |
Changes to src/json_status.c.
| ︙ | |||
165 166 167 168 169 170 171 | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - + |
case -4: zLabel = "INTEGRATE "; break;
}
blob_append(report, zPrefix, nPrefix);
blob_appendf(report, "%s %s\n", zLabel, db_column_text(&q, 0));
}
db_finalize(&q);
if( nErr ){
|
Changes to src/main.c.
| ︙ | |||
1466 1467 1468 1469 1470 1471 1472 | 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 | - + - + |
if( file_chdir(zDir, 1) ){
fossil_panic("unable to chroot into %s", zDir);
}
g.fJail = 1;
zRepo = "/";
}else{
for(i=strlen(zDir)-1; i>0 && zDir[i]!='/'; i--){}
|
| ︙ |
Changes to src/printf.c.
| ︙ | |||
1130 1131 1132 1133 1134 1135 1136 | 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | - + - + + - - - + + + + + + + - + + |
fossil_trace("%s\n", z);
}
return rc;
}
/*
** Print an error message, rollback all databases, and quit. These
|
| ︙ |
Changes to src/sqlcmd.c.
| ︙ | |||
301 302 303 304 305 306 307 | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | - + |
*pzKey = zKey;
if( fossil_getenv("FOSSIL_USE_SEE_TEXTKEY")==0 ){
*pnKey = (int)strlen(zKey);
}else{
*pnKey = -1;
}
}else{
|
| ︙ |
Changes to src/undo.c.
| ︙ | |||
267 268 269 270 271 272 273 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - + |
** Save the current content of the file zPathname so that it
** will be undoable. The name is relative to the root of the
** tree.
*/
void undo_save(const char *zPathname){
if( undoDisable ) return;
if( undo_maybe_save(zPathname, -1)!=UNDO_SAVED_OK ){
|
| ︙ |
Changes to src/util.c.
| ︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + - + - + |
}
/*
** Malloc and free routines that cannot fail
*/
void *fossil_malloc(size_t n){
void *p = malloc(n==0 ? 1 : n);
|
| ︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + - + - + - + |
fossil_get_page_size(&pageSize);
assert( pageSize>0 );
assert( pageSize%2==0 );
#if defined(_WIN32)
p = VirtualAlloc(NULL, pageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
if( p==NULL ){
|
| ︙ |
Changes to src/winfile.c.
| ︙ | |||
280 281 282 283 284 285 286 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - + |
** characters are converted to '/'.
*/
void win32_getcwd(char *zBuf, int nBuf){
int i;
char *zUtf8;
wchar_t *zWide = fossil_malloc( sizeof(wchar_t)*nBuf );
if( GetCurrentDirectoryW(nBuf, zWide)==0 ){
|
| ︙ |
Changes to src/winhttp.c.
| ︙ | |||
286 287 288 289 290 291 292 | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | - + |
** Issue a fatal error.
*/
static NORETURN void winhttp_fatal(
const char *zOp,
const char *zService,
const char *zErr
){
|
| ︙ | |||
602 603 604 605 606 607 608 609 | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | + - + - + |
iPort++;
continue;
}
}
break;
}
if( iPort>mxPort ){
/* These exits are merely fatal because firewall settings can cause them. */
if( mnPort==mxPort ){
|
| ︙ | |||
906 907 908 909 910 911 912 | 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 | - + |
if( GetStdHandle(STD_INPUT_HANDLE)!=NULL ){ return 1; }
/* Try to start the control dispatcher thread for the service. */
if( !StartServiceCtrlDispatcherW(ServiceTable) ){
if( GetLastError()==ERROR_FAILED_SERVICE_CONTROLLER_CONNECT ){
return 1;
}else{
|
| ︙ |