SHA256
1
0
forked from pool/openssh
openssh/openssh-4.6p1-strict-aliasing-fix.diff

72 lines
1.9 KiB
Diff

--- readconf.c
+++ readconf.c
@@ -328,6 +328,7 @@
int opcode, *intptr, value, value2, scale;
long long orig, val64;
size_t len;
+ LogLevel *loglevelptr;
Forward fwd;
/* Strip trailing whitespace */
@@ -692,14 +693,14 @@
break;
case oLogLevel:
- intptr = (int *) &options->log_level;
+ loglevelptr = &options->log_level;
arg = strdelim(&s);
value = log_level_number(arg);
if (value == SYSLOG_LEVEL_NOT_SET)
fatal("%.200s line %d: unsupported log level '%s'",
filename, linenum, arg ? arg : "<NONE>");
- if (*activep && (LogLevel) *intptr == SYSLOG_LEVEL_NOT_SET)
- *intptr = (LogLevel) value;
+ if (*activep && *loglevelptr == SYSLOG_LEVEL_NOT_SET)
+ *loglevelptr = (LogLevel) value;
break;
case oLocalForward:
--- servconf.c
+++ servconf.c
@@ -622,6 +622,8 @@
{
char *cp, **charptr, *arg, *p;
int cmdline = 0, *intptr, value, n;
+ LogLevel *loglevelptr;
+ SyslogFacility *syslogfacilityptr;
ServerOpCodes opcode;
u_short port;
u_int i, flags = 0;
@@ -977,25 +979,25 @@
goto parse_flag;
case sLogFacility:
- intptr = (int *) &options->log_facility;
+ syslogfacilityptr = &options->log_facility;
arg = strdelim(&cp);
value = log_facility_number(arg);
if (value == SYSLOG_FACILITY_NOT_SET)
fatal("%.200s line %d: unsupported log facility '%s'",
filename, linenum, arg ? arg : "<NONE>");
- if (*intptr == -1)
- *intptr = (SyslogFacility) value;
+ if (*syslogfacilityptr == -1)
+ *syslogfacilityptr = (SyslogFacility) value;
break;
case sLogLevel:
- intptr = (int *) &options->log_level;
+ loglevelptr = &options->log_level;
arg = strdelim(&cp);
value = log_level_number(arg);
if (value == SYSLOG_LEVEL_NOT_SET)
fatal("%.200s line %d: unsupported log level '%s'",
filename, linenum, arg ? arg : "<NONE>");
- if (*intptr == -1)
- *intptr = (LogLevel) value;
+ if (*loglevelptr == -1)
+ *loglevelptr = (LogLevel) value;
break;
case sAllowTcpForwarding: