mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Added printf() to avoid windows crash on long config files
SVN revision: 1364
This commit is contained in:
parent
8dc406d711
commit
f8bad23af8
11
src/elogd.c
11
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.657 2005/05/12 20:59:31 ritt
|
||||||
|
Added printf() to avoid windows crash on long config files
|
||||||
|
|
||||||
Revision 1.656 2005/05/12 20:02:12 ritt
|
Revision 1.656 2005/05/12 20:02:12 ritt
|
||||||
Version 2.5.9-3
|
Version 2.5.9-3
|
||||||
|
|
||||||
@ -3332,7 +3335,7 @@ int parse_config_file(char *file_name)
|
|||||||
if (*p == '[') {
|
if (*p == '[') {
|
||||||
p++;
|
p++;
|
||||||
pstr = str;
|
pstr = str;
|
||||||
while (*p && *p != ']' && *p != '\n' && *p != '\r')
|
while (*p && *p != ']' && *p != '\n' && *p != '\r' && (int)pstr-(int)str < 10000)
|
||||||
*pstr++ = *p++;
|
*pstr++ = *p++;
|
||||||
*pstr = 0;
|
*pstr = 0;
|
||||||
|
|
||||||
@ -3352,7 +3355,7 @@ int parse_config_file(char *file_name)
|
|||||||
p++;
|
p++;
|
||||||
while (p && *p && *p != '[') {
|
while (p && *p && *p != '[') {
|
||||||
pstr = str;
|
pstr = str;
|
||||||
while (*p && *p != '=' && *p != '\n' && *p != '\r')
|
while (*p && *p != '=' && *p != '\n' && *p != '\r' && (int)pstr-(int)str < 10000)
|
||||||
*pstr++ = *p++;
|
*pstr++ = *p++;
|
||||||
*pstr-- = 0;
|
*pstr-- = 0;
|
||||||
while (pstr > str && (*pstr == ' ' || *pstr == '\t' || *pstr == '='))
|
while (pstr > str && (*pstr == ' ' || *pstr == '\t' || *pstr == '='))
|
||||||
@ -3378,7 +3381,7 @@ int parse_config_file(char *file_name)
|
|||||||
while (*p == ' ' || *p == '\t')
|
while (*p == ' ' || *p == '\t')
|
||||||
p++;
|
p++;
|
||||||
pstr = str;
|
pstr = str;
|
||||||
while (*p && *p != '\n' && *p != '\r')
|
while (*p && *p != '\n' && *p != '\r' && (int)pstr-(int)str < 10000)
|
||||||
*pstr++ = *p++;
|
*pstr++ = *p++;
|
||||||
*pstr-- = 0;
|
*pstr-- = 0;
|
||||||
while (*pstr == ' ' || *pstr == '\t')
|
while (*pstr == ' ' || *pstr == '\t')
|
||||||
@ -22975,6 +22978,8 @@ int main(int argc, char *argv[])
|
|||||||
struct tm *tms;
|
struct tm *tms;
|
||||||
struct stat finfo;
|
struct stat finfo;
|
||||||
|
|
||||||
|
printf(""); /* needed by windows, otherwis crash on long config files ??? */
|
||||||
|
|
||||||
#ifdef OS_UNIX
|
#ifdef OS_UNIX
|
||||||
/* save gid/uid to regain later */
|
/* save gid/uid to regain later */
|
||||||
orig_gid = getegid();
|
orig_gid = getegid();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user