File: format-security.patch

package info (click to toggle)
gbdfed 1.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,436 kB
  • sloc: ansic: 44,244; makefile: 214; sh: 23
file content (46 lines) | stat: -rw-r--r-- 1,447 bytes parent folder | download | duplicates (2)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From: Andrej Shadura <andrewsh@debian.org>
Date: Thu, 13 Oct 2016 13:11:39 +0200
Subject: Fix format-security bugs

---
 bdf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bdf.c b/bdf.c
index cf0e9a7..988c56b 100644
--- a/bdf.c
+++ b/bdf.c
@@ -2843,14 +2843,14 @@ bdf_save_font(FILE *out, bdf_font_t *font, bdf_options_t *opts,
         bpr = ((c->bbx.width * font->bpp) + 7) >> 3;
         for (j = 0; bpr != 0 && j < c->bytes; j++) {
             if (j && j % bpr == 0)
-              fprintf(out, eol);
+              fprintf(out, "%s", eol);
             fprintf(out, "%02X", c->bitmap[j]);
         }
         /*
          * Handle empty bitmaps like this.
          */
         if (c->bbx.height > 0)
-          fprintf(out, eol);
+          fprintf(out, "%s", eol);
         fprintf(out, "ENDCHAR%s", eol);
 
         /*
@@ -2915,14 +2915,14 @@ bdf_save_font(FILE *out, bdf_font_t *font, bdf_options_t *opts,
         bpr = ((c->bbx.width * font->bpp) + 7) >> 3;
         for (j = 0; bpr != 0 && j < c->bytes; j++) {
             if (j && j % bpr == 0)
-              fprintf(out, eol);
+              fprintf(out, "%s", eol);
             fprintf(out, "%02X", c->bitmap[j]);
         }
         /*
          * Handle empty bitmaps like this.
          */
         if (c->bbx.height > 0)
-          fprintf(out, eol);
+          fprintf(out, "%s", eol);
         fprintf(out, "ENDCHAR%s", eol);
 
         /*