Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | More proposed fixes to the issues pointed out by Edward Berner. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | warningFixes |
| Files: | files | file ages | folders |
| SHA1: |
4429a4c3cc7de21113adba7e425f9827 |
| User & Date: | mistachkin 2014-09-07 19:50:07.381 |
Context
|
2014-09-08
| ||
| 18:46 | Another warning fix. ... (Closed-Leaf check-in: 865b8e964f user: mistachkin tags: warningFixes) | |
|
2014-09-07
| ||
| 19:50 | More proposed fixes to the issues pointed out by Edward Berner. ... (check-in: 4429a4c3cc user: mistachkin tags: warningFixes) | |
| 09:49 | removed a duplicated if() block, moved a free()-after-return, both reported by Edward Berner. ... (check-in: 3fc62dde2c user: stephan tags: trunk) | |
Changes
Changes to src/cgi.c.
| ︙ | ︙ | |||
1594 1595 1596 1597 1598 1599 1600 |
** and subsequent code handles the actual generation of the webpage.
*/
void cgi_handle_scgi_request(void){
char *zHdr;
char *zToFree;
int nHdr = 0;
int nRead;
| | < | | | 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 |
** and subsequent code handles the actual generation of the webpage.
*/
void cgi_handle_scgi_request(void){
char *zHdr;
char *zToFree;
int nHdr = 0;
int nRead;
int c, n, m;
while( (c = fgetc(g.httpIn))!=EOF && fossil_isdigit((char)c) ){
nHdr = nHdr*10 + (char)c - '0';
}
if( nHdr<16 ) malformed_request("SCGI header too short");
zToFree = zHdr = fossil_malloc(nHdr);
nRead = (int)fread(zHdr, 1, nHdr, g.httpIn);
if( nRead<nHdr ) malformed_request("cannot read entire SCGI header");
nHdr = nRead;
while( nHdr ){
|
| ︙ | ︙ |
Changes to src/diff.c.
| ︙ | ︙ | |||
592 593 594 595 596 597 598 |
static void sbsWriteColumn(Blob *pOut, Blob *pCol, int col){
blob_appendf(pOut,
"<td><div class=\"diff%scol\">\n"
"<pre>\n"
"%s"
"</pre>\n"
"</div></td>\n",
| | | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 |
static void sbsWriteColumn(Blob *pOut, Blob *pCol, int col){
blob_appendf(pOut,
"<td><div class=\"diff%scol\">\n"
"<pre>\n"
"%s"
"</pre>\n"
"</div></td>\n",
(col % 3) ? (col == SBS_MKR ? "mkr" : "txt") : "ln",
blob_str(pCol)
);
}
/*
** Append a separator line to column iCol
*/
|
| ︙ | ︙ |
Changes to src/diffcmd.c.
| ︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
*/
#if defined(_WIN32)
# define NULL_DEVICE "NUL"
#else
# define NULL_DEVICE "/dev/null"
#endif
/*
** Print the "Index:" message that patches wants to see at the top of a diff.
*/
void diff_print_index(const char *zFile, u64 diffFlags){
if( (diffFlags & (DIFF_SIDEBYSIDE|DIFF_BRIEF))==0 ){
char *z = mprintf("Index: %s\n%.66c\n", zFile, '=');
fossil_print("%s", z);
| > > > > > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
*/
#if defined(_WIN32)
# define NULL_DEVICE "NUL"
#else
# define NULL_DEVICE "/dev/null"
#endif
/*
** Used when the name for the diff is unknown.
*/
#define DIFF_NO_NAME "(unknown)"
/*
** Print the "Index:" message that patches wants to see at the top of a diff.
*/
void diff_print_index(const char *zFile, u64 diffFlags){
if( (diffFlags & (DIFF_SIDEBYSIDE|DIFF_BRIEF))==0 ){
char *z = mprintf("Index: %s\n%.66c\n", zFile, '=');
fossil_print("%s", z);
|
| ︙ | ︙ | |||
487 488 489 490 491 492 493 |
const char *zBinGlob,
int fIncludeBinary,
u64 diffFlags
){
Blob f1, f2;
int isBin1, isBin2;
int rid;
| | > > > > > > > | 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
const char *zBinGlob,
int fIncludeBinary,
u64 diffFlags
){
Blob f1, f2;
int isBin1, isBin2;
int rid;
const char *zName;
if( pFrom ){
zName = pFrom->zName;
}else if( pTo ){
zName = pTo->zName;
}else{
zName = DIFF_NO_NAME;
}
if( diffFlags & DIFF_BRIEF ) return;
diff_print_index(zName, diffFlags);
if( pFrom ){
rid = uuid_to_rid(pFrom->zUuid, 0);
content_get(rid, &f1);
}else{
blob_zero(&f1);
|
| ︙ | ︙ |
Changes to src/markdown.c.
| ︙ | ︙ | |||
388 389 390 391 392 393 394 |
j = i;
while( i<size
&& data[i]!='>'
&& data[i]!='\''
&& data[i]!='"'
&& data[i]!=' '
&& data[i]!='\t'
| | | 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
j = i;
while( i<size
&& data[i]!='>'
&& data[i]!='\''
&& data[i]!='"'
&& data[i]!=' '
&& data[i]!='\t'
&& data[i]!='\n'
){
i++;
}
if( i>=size ) return 0;
if( i>j && data[i]=='>' ) return i+1;
/* one of the forbidden chars has been found */
*autolink = MKDA_NOT_AUTOLINK;
|
| ︙ | ︙ |