1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Don't log_Printf(..., buf) in case buf contains %s

Info provided by: Ollivier Robert <roberto@keltia.freenix.fr>
This commit is contained in:
Brian Somers 1999-08-08 15:19:00 +00:00
parent 890c628e79
commit 9cf01ccf8c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49527

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: log.c,v 1.38 1999/05/12 09:48:52 brian Exp $
* $Id: log.c,v 1.39 1999/06/01 16:01:48 brian Exp $
*/
#include <sys/types.h>
@ -356,8 +356,8 @@ log_DumpBp(int lev, const char *hdr, const struct mbuf *bp)
b += 3;
if (b == buf + 48) {
memset(b, ' ', 2);
strcpy(c, "\n");
log_Printf(lev, buf);
*c = '\0';
log_Printf(lev, "%s\n", buf);
b = buf;
c = b + 50;
}
@ -366,8 +366,8 @@ log_DumpBp(int lev, const char *hdr, const struct mbuf *bp)
if (b > buf) {
memset(b, ' ', 50 - (b - buf));
strcpy(c, "\n");
log_Printf(lev, buf);
*c = '\0';
log_Printf(lev, "%s\n", buf);
}
}
}
@ -389,8 +389,8 @@ log_DumpBuff(int lev, const char *hdr, const u_char *ptr, int n)
*c++ = isprint(*ptr) ? *ptr : '.';
}
memset(b, ' ', 50 - (b - buf));
strcpy(c, "\n");
log_Printf(lev, buf);
*c = '\0';
log_Printf(lev, "%s\n", buf);
}
}
}