summaryrefslogtreecommitdiff
path: root/audio/abcmidi/patches/patch-ab
blob: 8367bed6720d06c967b8b3ea8e78a42c234c5af2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-ab,v 1.2 2011/02/17 13:54:12 ryoon Exp $

--- drawtune.c.orig	2010-02-08 16:36:39.000000000 +0000
+++ drawtune.c
@@ -492,7 +492,7 @@ char* s;
   double x;
   char units[40];
 
-  count = sscanf(s, "%lf%s", &x, units);
+  count = sscanf(s, "%lf%39s", &x, units);
   if (count > 0) {
     if ((count >= 2) && (strncmp(units, "cm", 2) == 0)) {
       x = x*28.3;
@@ -1956,7 +1956,7 @@ static void define_font(struct font* the
   char fontname[80];
   int fontsize, params;
    
-  params = sscanf(s, "%s %d", fontname, &fontsize);
+  params = sscanf(s, "%79s %d", fontname, &fontsize);
   if (params >= 1) {
     if (strcmp(fontname, "-") != 0) {
       if (thefont->name != NULL) {
@@ -1980,7 +1980,7 @@ char *s;
   int result;
 
   p[0] = '\0';
-  sscanf(s, " %10s", p);
+  sscanf(s, " %9s", p);
   result = 1;
   if ((strcmp(p, "0") == 0) || (strcmp(p, "no") == 0) || 
       (strcmp(p, "false") == 0)) {