forked from pool/maelstrom
- Change Desktop entry file - Remove leading article from Summary - Change URL - Remove obsolete patches - Add new patches from Gentoo, Fedora and my port in FreeBSD - Add patches, correct FSF Address add missing includes - Add BuildRequires for desktop-file-utils - Change description - Fix paths - Simplify installation handling - Use install-binPROGRAMS and normal Name for executables Maelstrom and Maelstrom-netd I maintain Maelstorm in FreeBSD. OBS-URL: https://build.opensuse.org/request/show/252721 OBS-URL: https://build.opensuse.org/package/show/games/maelstrom?expand=0&rev=8
33 lines
713 B
Diff
33 lines
713 B
Diff
--- myerror.cpp.orig 1998-07-14 03:50:17.000000000 +0200
|
|
+++ myerror.cpp 2014-09-28 13:28:02.088439917 +0200
|
|
@@ -16,7 +16,8 @@
|
|
va_list ap;
|
|
|
|
va_start(ap, fmt);
|
|
- vsprintf(mesg, fmt, ap);
|
|
+ vsnprintf(mesg, sizeof(mesg), fmt, ap);
|
|
+
|
|
fputs(mesg, stderr);
|
|
va_end(ap);
|
|
}
|
|
@@ -27,7 +28,7 @@
|
|
va_list ap;
|
|
|
|
va_start(ap, fmt);
|
|
- vsprintf(mesg, fmt, ap);
|
|
+ vsnprintf(mesg, sizeof(mesg), fmt, ap);
|
|
fputs(mesg, stdout);
|
|
va_end(ap);
|
|
}
|
|
@@ -37,8 +38,8 @@
|
|
char buffer[BUFSIZ];
|
|
|
|
if ( *msg ) {
|
|
- sprintf(buffer, "%s: %s\n", msg, strerror(errno));
|
|
- error(buffer);
|
|
+ snprintf(buffer, sizeof(buffer), "%s: %s\n", msg, strerror(errno));
|
|
+ error("%s", buffer);
|
|
} else
|
|
error((char *)strerror(errno));
|
|
}
|