1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Fix compiler warnings seen on OpenBSD.

This commit is contained in:
david
2010-08-02 20:30:29 +00:00
parent 6510ae3d00
commit 45468ba2a0
3 changed files with 3 additions and 3 deletions

View File

@@ -2002,7 +2002,7 @@ int gather_logfile_resumption_state(char *fname, int *myargc, char ***myargv) {
fatal("Unable to parse supposed log file %s. Perhaps the Nmap execution had not finished at least one host? In that case there is no use \"resuming\"", fname);
strcpy(nmap_arg_buffer, "nmap --append-output ");
strncpy(nmap_arg_buffer, "nmap --append-output ", sizeof(nmap_arg_buffer));
if ((q-p) + 21 + 1 >= (int) sizeof(nmap_arg_buffer)) fatal("0verfl0w");
memcpy(nmap_arg_buffer + 21, p, q-p);
nmap_arg_buffer[21 + q-p] = '\0';

View File

@@ -2702,7 +2702,7 @@ bool HostOsScan::get_tcpopt_string(struct tcp_hdr *tcp, int mss, char *result, i
break; /* Window Scale option has 3 bytes */
*p++ = 'W';
q++;
sprintf(p, "%hX", *((u8*)q));
snprintf(p, length, "%hX", *((u8*)q));
p += strlen(p); /* max movement of p is 2 (max WScale value is 0xFF) */
q++;
length -= 3;

View File

@@ -549,7 +549,7 @@ void printportoutput(Target * currenths, PortList * plist) {
fatal("Unable to properly format host start time");
log_write(LOG_PLAIN, "Scanned at %s for %lds\n",
tbufs, tm_sece - tm_secs);
tbufs, (long) (tm_sece - tm_secs));
}
log_write(LOG_MACHINE, "Host: %s (%s)", currenths->targetipstr(),
currenths->HostName());