Compare commits
10 Commits
7148ca10d2
...
f575783afd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f575783afd | ||
|
|
e9412c92fc | ||
|
|
947f265a73 | ||
|
|
0844e88ac4 | ||
|
|
7e8391f26d | ||
|
|
d2d64e394a | ||
|
|
6cdfadf98c | ||
|
|
de4a21d6db | ||
|
|
78a50146e5 | ||
|
|
6750fff819 |
124
CVE-2024-0911.patch
Normal file
124
CVE-2024-0911.patch
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
From 32df891141689ed73499f4e60f64268957f1e3c2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Wed, 24 Jan 2024 14:03:58 +0100
|
||||||
|
Subject: [PATCH] Fix a heap buffer underread in set_buf_break()
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
If an opening parenthesis follows a comment with a text, a read from
|
||||||
|
an invalid address happens in set_buf_break():
|
||||||
|
|
||||||
|
$ printf '/*a*/()' | valgrind -- ./src/indent - -o /dev/null
|
||||||
|
==28887== Memcheck, a memory error detector
|
||||||
|
==28887== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward
|
||||||
|
et al.
|
||||||
|
==28887== Using Valgrind-3.22.0 and LibVEX; rerun with -h for
|
||||||
|
copyright info
|
||||||
|
==28887== Command: ./src/indent - -o /dev/null
|
||||||
|
==28887==
|
||||||
|
==28887== Invalid read of size 2
|
||||||
|
==28887== at 0x409989: set_buf_break (output.c:319)
|
||||||
|
==28887== by 0x401FE7: indent_main_loop (indent.c:640)
|
||||||
|
==28887== by 0x4022A7: indent (indent.c:759)
|
||||||
|
==28887== by 0x40294E: indent_single_file (indent.c:1004)
|
||||||
|
==28887== by 0x402A1C: indent_all (indent.c:1042)
|
||||||
|
==28887== by 0x402BD0: main (indent.c:1123)
|
||||||
|
==28887== Address 0x4a5facc is 4 bytes before a block of size 16
|
||||||
|
alloc'd
|
||||||
|
==28887== at 0x4849E60: calloc (vg_replace_malloc.c:1595)
|
||||||
|
==28887== by 0x408B61: xmalloc (globs.c:42)
|
||||||
|
==28887== by 0x40765E: init_parser (parse.c:73)
|
||||||
|
==28887== by 0x402B1F: main (indent.c:1101)
|
||||||
|
|
||||||
|
It happens when checking an indentation level of the outer scope by
|
||||||
|
indexing
|
||||||
|
parser_state_tos->paren_indents[]:
|
||||||
|
|
||||||
|
level = parser_state_tos->p_l_follow;
|
||||||
|
[...]
|
||||||
|
/* Did we just parse a bracket that will be put on the next line
|
||||||
|
* by this line break? */
|
||||||
|
if ((*token == '(') || (*token == '['))
|
||||||
|
--level; /* then don't take it into account */
|
||||||
|
[...]
|
||||||
|
if (level == 0) {
|
||||||
|
} else {
|
||||||
|
→ if (parser_state_tos->paren_indents[level - 1] < 0) {...}
|
||||||
|
}
|
||||||
|
|
||||||
|
The cause is a special case for moving opening parentheses and
|
||||||
|
brackets to a next line. If parser_state_tos->p_l_follow is zero
|
||||||
|
(like in the reproducer), the index evaluates to -2 and goes out of
|
||||||
|
range of the paren_indents array.
|
||||||
|
|
||||||
|
This patch simply prevents from decreasing the index under zero when
|
||||||
|
formating the code. Maybe it leaves some piece of code unformated, but
|
||||||
|
it's safe.
|
||||||
|
|
||||||
|
I checked all places where p_l_follow is set (it is only in
|
||||||
|
handletoken.c) and they corretly prevent from decrasing it under
|
||||||
|
zero. That keeps set_buf_break() in output.c as the culprit.
|
||||||
|
|
||||||
|
<https://lists.gnu.org/archive/html/bug-indent/2024-01/msg00000.html>
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
regression/TEST | 3 ++-
|
||||||
|
regression/input/comment-parent-heap-underread.c | 3 +++
|
||||||
|
regression/standard/comment-parent-heap-underread.c | 5 +++++
|
||||||
|
src/output.c | 2 +-
|
||||||
|
4 files changed, 11 insertions(+), 2 deletions(-)
|
||||||
|
create mode 100644 regression/input/comment-parent-heap-underread.c
|
||||||
|
create mode 100644 regression/standard/comment-parent-heap-underread.c
|
||||||
|
|
||||||
|
diff --git a/regression/TEST b/regression/TEST
|
||||||
|
index 37d0664..76b5648 100755
|
||||||
|
--- a/regression/TEST
|
||||||
|
+++ b/regression/TEST
|
||||||
|
@@ -39,7 +39,8 @@ BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \
|
||||||
|
one-line-4.c struct-decl.c sizeof-in-while.c line-break-comment.c \
|
||||||
|
macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \
|
||||||
|
bug-gnu-33364.c float-constant-suffix.c block-comments.c \
|
||||||
|
- no-forced-nl-in-block-init.c hexadecimal_float.c binary-constant.c"
|
||||||
|
+ no-forced-nl-in-block-init.c hexadecimal_float.c binary-constant.c \
|
||||||
|
+ comment-parent-heap-underread.c"
|
||||||
|
|
||||||
|
INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \
|
||||||
|
indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \
|
||||||
|
diff --git a/regression/input/comment-parent-heap-underread.c b/regression/input/comment-parent-heap-underread.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..68e13cf
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/regression/input/comment-parent-heap-underread.c
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+void foo(void) {
|
||||||
|
+/*a*/(1);
|
||||||
|
+}
|
||||||
|
diff --git a/regression/standard/comment-parent-heap-underread.c b/regression/standard/comment-parent-heap-underread.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..9a1c6e3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/regression/standard/comment-parent-heap-underread.c
|
||||||
|
@@ -0,0 +1,5 @@
|
||||||
|
+void
|
||||||
|
+foo (void)
|
||||||
|
+{
|
||||||
|
+/*a*/ (1);
|
||||||
|
+}
|
||||||
|
diff --git a/src/output.c b/src/output.c
|
||||||
|
index ee01bcc..17eee6e 100644
|
||||||
|
--- a/src/output.c
|
||||||
|
+++ b/src/output.c
|
||||||
|
@@ -290,7 +290,7 @@ void set_buf_break (
|
||||||
|
/* Did we just parse a bracket that will be put on the next line
|
||||||
|
* by this line break? */
|
||||||
|
|
||||||
|
- if ((*token == '(') || (*token == '['))
|
||||||
|
+ if (level > 0 && ((*token == '(') || (*token == '[')))
|
||||||
|
{
|
||||||
|
--level; /* then don't take it into account */
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
15
fix-a-heap-buffer-overwrite-CVE-2023-40305.patch
Normal file
15
fix-a-heap-buffer-overwrite-CVE-2023-40305.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
From: Petr Písař <ppisar@redhat.com>
|
||||||
|
Subject: Fix a heap buffer overwrite in search_brace() (CVE-2023-40305)
|
||||||
|
Bug-Debian: https://bugs.debian.org/1049366
|
||||||
|
Forwarded: https://savannah.gnu.org/bugs/index.php?64503
|
||||||
|
|
||||||
|
--- a/src/indent.c
|
||||||
|
+++ b/src/indent.c
|
||||||
|
@@ -228,6 +228,7 @@
|
||||||
|
* a `dump_line' call, thus ensuring that the brace
|
||||||
|
* will go into the right column. */
|
||||||
|
|
||||||
|
+ need_chars (&save_com, 2);
|
||||||
|
*save_com.end++ = EOL;
|
||||||
|
*save_com.end++ = '{';
|
||||||
|
save_com.len += 2;
|
||||||
17
fix-an-out-of-buffer-read-CVE-2023-40305.patch
Normal file
17
fix-an-out-of-buffer-read-CVE-2023-40305.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
From: Petr Písař <ppisar@redhat.com>
|
||||||
|
Subject: Fix an out-of-buffer read in search_brace()/lexi()
|
||||||
|
Bug-Debian: https://bugs.debian.org/1049366
|
||||||
|
Forwarded: https://savannah.gnu.org/bugs/index.php?64503
|
||||||
|
|
||||||
|
--- a/src/indent.c
|
||||||
|
+++ b/src/indent.c
|
||||||
|
@@ -145,8 +145,8 @@
|
||||||
|
parser_state_tos->search_brace = false;
|
||||||
|
bp_save = buf_ptr;
|
||||||
|
be_save = buf_end;
|
||||||
|
- buf_ptr = save_com.ptr;
|
||||||
|
need_chars (&save_com, 1);
|
||||||
|
+ buf_ptr = save_com.ptr;
|
||||||
|
buf_end = save_com.end;
|
||||||
|
save_com.end = save_com.ptr; /* make save_com empty */
|
||||||
|
}
|
||||||
@ -1,102 +0,0 @@
|
|||||||
From 7ef312f8a721b99469ea85e33e973475006c6a7f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Tue, 19 Feb 2013 13:17:12 +0100
|
|
||||||
Subject: [PATCH 2/2] Allow 64-bit stat
|
|
||||||
|
|
||||||
---
|
|
||||||
src/code_io.c | 38 ++++++++++++++++++++++++++++++++------
|
|
||||||
src/indent.h | 2 +-
|
|
||||||
2 files changed, 33 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/code_io.c b/src/code_io.c
|
|
||||||
index 8c8fd41..8b93188 100644
|
|
||||||
--- a/src/code_io.c
|
|
||||||
+++ b/src/code_io.c
|
|
||||||
@@ -50,6 +50,8 @@
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#include <string.h>
|
|
||||||
+#include <errno.h>
|
|
||||||
+#include <limits.h>
|
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
#include <file.h>
|
|
||||||
@@ -246,13 +248,18 @@ extern file_buffer_ty * read_file(
|
|
||||||
{
|
|
||||||
static file_buffer_ty fileptr = {NULL};
|
|
||||||
|
|
||||||
+#if defined(__MSDOS__) || defined(VMS)
|
|
||||||
/*
|
|
||||||
* size is required to be unsigned for MSDOS,
|
|
||||||
* in order to read files larger than 32767
|
|
||||||
* bytes in a 16-bit world...
|
|
||||||
*/
|
|
||||||
|
|
||||||
- unsigned int size;
|
|
||||||
+ unsigned int size, size_to_read;
|
|
||||||
+#else
|
|
||||||
+ ssize_t size;
|
|
||||||
+ size_t size_to_read;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
int namelen = strlen(filename);
|
|
||||||
int fd = open(filename, O_RDONLY, 0777);
|
|
||||||
@@ -289,6 +296,10 @@ extern file_buffer_ty * read_file(
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (file_stats->st_size > SSIZE_MAX)
|
|
||||||
+ {
|
|
||||||
+ fatal(_("File %s is too big to read"), filename);
|
|
||||||
+ }
|
|
||||||
fileptr.size = file_stats->st_size;
|
|
||||||
|
|
||||||
if (fileptr.data != 0)
|
|
||||||
@@ -305,11 +316,26 @@ extern file_buffer_ty * read_file(
|
|
||||||
* newline. */
|
|
||||||
}
|
|
||||||
|
|
||||||
- size = INDENT_SYS_READ (fd, fileptr.data, fileptr.size);
|
|
||||||
-
|
|
||||||
- if (size == (unsigned int) -1)
|
|
||||||
- {
|
|
||||||
- fatal (_("Error reading input file %s"), filename);
|
|
||||||
+ size_to_read = fileptr.size;
|
|
||||||
+ while (size_to_read > 0) {
|
|
||||||
+ size = INDENT_SYS_READ (fd, fileptr.data + fileptr.size - size_to_read,
|
|
||||||
+ size_to_read);
|
|
||||||
+
|
|
||||||
+ if (size ==
|
|
||||||
+#if defined(__MSDOS__) || defined(VMS)
|
|
||||||
+ (unsigned int)
|
|
||||||
+#endif
|
|
||||||
+ -1)
|
|
||||||
+ {
|
|
||||||
+#if !defined(__MSDOS__) && !defined(VMS)
|
|
||||||
+ if (errno == EINTR)
|
|
||||||
+ {
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+ fatal (_("Error reading input file %s"), filename);
|
|
||||||
+ }
|
|
||||||
+ size_to_read -= size;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (close (fd) < 0)
|
|
||||||
diff --git a/src/indent.h b/src/indent.h
|
|
||||||
index 60ccb5a..bcb6b64 100644
|
|
||||||
--- a/src/indent.h
|
|
||||||
+++ b/src/indent.h
|
|
||||||
@@ -106,7 +106,7 @@ typedef unsigned char BOOLEAN;
|
|
||||||
typedef struct file_buffer
|
|
||||||
{
|
|
||||||
char *name;
|
|
||||||
- unsigned long size;
|
|
||||||
+ size_t size;
|
|
||||||
char *data;
|
|
||||||
} file_buffer_ty;
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.1.2
|
|
||||||
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
From ff47ab3b90333bdfaa40b86cb548e92a01787345 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Thu, 25 Aug 2011 11:26:24 +0200
|
|
||||||
Subject: [PATCH] Do not split decimal float suffix from constant
|
|
||||||
|
|
||||||
N1312 draft of ISO/IEC WDTR24732 defines additional floating types
|
|
||||||
with given suffixes:
|
|
||||||
|
|
||||||
_Decimal32 DF, df
|
|
||||||
_Decimal64 DD, dd
|
|
||||||
_Decimal128 DL, dl
|
|
||||||
|
|
||||||
These suffixes must stick on numeric part of the constant as classic
|
|
||||||
float or long float does.
|
|
||||||
---
|
|
||||||
regression/TEST | 3 ++-
|
|
||||||
regression/input/float-constant-suffix.c | 13 +++++++++++++
|
|
||||||
regression/standard/float-constant-suffix.c | 13 +++++++++++++
|
|
||||||
src/lexi.c | 9 +++++++++
|
|
||||||
4 files changed, 37 insertions(+), 1 deletions(-)
|
|
||||||
create mode 100644 regression/input/float-constant-suffix.c
|
|
||||||
create mode 100644 regression/standard/float-constant-suffix.c
|
|
||||||
|
|
||||||
diff --git a/regression/TEST b/regression/TEST
|
|
||||||
index c860ef2..1402ddf 100755
|
|
||||||
--- a/regression/TEST
|
|
||||||
+++ b/regression/TEST
|
|
||||||
@@ -35,7 +35,8 @@ EXAMPLES="do.c else.c for.c func-def.c lshift.c ncs.c \
|
|
||||||
|
|
||||||
BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \
|
|
||||||
one-line-4.c struct-decl.c sizeof-in-while.c line-break-comment.c \
|
|
||||||
- macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c"
|
|
||||||
+ macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \
|
|
||||||
+ float-constant-suffix.c"
|
|
||||||
|
|
||||||
INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \
|
|
||||||
indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \
|
|
||||||
diff --git a/regression/input/float-constant-suffix.c b/regression/input/float-constant-suffix.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..58f5310
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/regression/input/float-constant-suffix.c
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+float foo = 1.0F;
|
|
||||||
+float foo = 1.0f;
|
|
||||||
+double foo = 1.0;
|
|
||||||
+double foo = 1.0;
|
|
||||||
+long double foo = 1.0L;
|
|
||||||
+long double foo = 1.0l;
|
|
||||||
+
|
|
||||||
+_Decimal32 foo = 1.0DF;
|
|
||||||
+_Decimal32 foo = 1.0df;
|
|
||||||
+_Decimal64 foo = 1.0DD;
|
|
||||||
+_Decimal64 foo = 1.0dd;
|
|
||||||
+_Decimal128 foo = 1.0DL;
|
|
||||||
+_Decimal128 foo = 1.0dl;
|
|
||||||
diff --git a/regression/standard/float-constant-suffix.c b/regression/standard/float-constant-suffix.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..58f5310
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/regression/standard/float-constant-suffix.c
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+float foo = 1.0F;
|
|
||||||
+float foo = 1.0f;
|
|
||||||
+double foo = 1.0;
|
|
||||||
+double foo = 1.0;
|
|
||||||
+long double foo = 1.0L;
|
|
||||||
+long double foo = 1.0l;
|
|
||||||
+
|
|
||||||
+_Decimal32 foo = 1.0DF;
|
|
||||||
+_Decimal32 foo = 1.0df;
|
|
||||||
+_Decimal64 foo = 1.0DD;
|
|
||||||
+_Decimal64 foo = 1.0dd;
|
|
||||||
+_Decimal128 foo = 1.0DL;
|
|
||||||
+_Decimal128 foo = 1.0dl;
|
|
||||||
diff --git a/src/lexi.c b/src/lexi.c
|
|
||||||
index abc2bfa..eafb65e 100644
|
|
||||||
--- a/src/lexi.c
|
|
||||||
+++ b/src/lexi.c
|
|
||||||
@@ -330,6 +330,15 @@ extern codes_ty lexi(void)
|
|
||||||
{
|
|
||||||
buf_ptr++;
|
|
||||||
}
|
|
||||||
+ else if (*buf_ptr == 'D' || *buf_ptr == 'd')
|
|
||||||
+ {
|
|
||||||
+ if (buf_ptr[1] == 'F' || buf_ptr[1] == 'f' ||
|
|
||||||
+ buf_ptr[1] == 'D' || buf_ptr[1] == 'd' ||
|
|
||||||
+ buf_ptr[1] == 'L' || buf_ptr[1] == 'l')
|
|
||||||
+ {
|
|
||||||
+ buf_ptr+=2;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
while (*buf_ptr == 'U' || *buf_ptr == 'u' || *buf_ptr == 'L' || *buf_ptr == 'l')
|
|
||||||
--
|
|
||||||
1.7.6
|
|
||||||
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
From 1394dd08b2284a0f83fac63025d19b66653d6585 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Tue, 19 Feb 2013 11:34:25 +0100
|
|
||||||
Subject: [PATCH 1/2] Fix compiler warnings
|
|
||||||
|
|
||||||
---
|
|
||||||
src/args.c | 6 ++++++
|
|
||||||
src/lexi.c | 10 ----------
|
|
||||||
2 files changed, 6 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/args.c b/src/args.c
|
|
||||||
index f392cce..abd2a6a 100644
|
|
||||||
--- a/src/args.c
|
|
||||||
+++ b/src/args.c
|
|
||||||
@@ -62,6 +62,10 @@
|
|
||||||
/* Argument scanning and profile reading code. Default parameters are set
|
|
||||||
* here as well. */
|
|
||||||
|
|
||||||
+#ifndef _XOPEN_SOURCE
|
|
||||||
+#define _XOPEN_SOURCE 500 /* strdup(3) */
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
@@ -174,7 +178,9 @@ static int exp_o = 0;
|
|
||||||
static int exp_orig = 0;
|
|
||||||
static int exp_pcs = 0;
|
|
||||||
static int exp_pi = 0;
|
|
||||||
+#ifdef PRESERVE_MTIME
|
|
||||||
static int exp_pmt = 0;
|
|
||||||
+#endif
|
|
||||||
static int exp_pro = 0;
|
|
||||||
static int exp_prs = 0;
|
|
||||||
static int exp_psl = 0;
|
|
||||||
diff --git a/src/lexi.c b/src/lexi.c
|
|
||||||
index abc2bfa..ef80e38 100644
|
|
||||||
--- a/src/lexi.c
|
|
||||||
+++ b/src/lexi.c
|
|
||||||
@@ -198,11 +198,6 @@ int main (void)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Include code generated by gperf */
|
|
||||||
-#ifdef __GNUC__
|
|
||||||
-__inline
|
|
||||||
-#endif
|
|
||||||
-templ_ty *is_reserved (const char *str, unsigned int len);
|
|
||||||
-
|
|
||||||
#include "gperf.c"
|
|
||||||
|
|
||||||
/* Include code generated by gperf for C++ keyword set */
|
|
||||||
@@ -212,11 +207,6 @@ templ_ty *is_reserved (const char *str, unsigned int len);
|
|
||||||
#undef MIN_WORD_LENGTH
|
|
||||||
#undef MAX_WORD_LENGTH
|
|
||||||
|
|
||||||
-#ifdef __GNUC__
|
|
||||||
-__inline
|
|
||||||
-#endif
|
|
||||||
-templ_ty *is_reserved_cc (register const char *str, register unsigned int len);
|
|
||||||
-
|
|
||||||
#include "gperf-cc.c"
|
|
||||||
|
|
||||||
/**
|
|
||||||
--
|
|
||||||
1.8.1.2
|
|
||||||
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
From 9e8a1699099f9aea5da11064e3aa9387ae9cffc6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Thu, 7 Mar 2013 11:32:02 +0100
|
|
||||||
Subject: [PATCH] Fix copying overlapping comment
|
|
||||||
|
|
||||||
Reformating block comments with -fca option triggered memcpy() on
|
|
||||||
overlapping areas.
|
|
||||||
|
|
||||||
E.g. comment:
|
|
||||||
|
|
||||||
/* Some statement. Unless it's special, arrange
|
|
||||||
* to break the line. */
|
|
||||||
|
|
||||||
from indent-2.2.11/indent.c hits it:
|
|
||||||
|
|
||||||
$ valgrind -- ./indent -o /dev/null -fca indent.c
|
|
||||||
Memcheck, a memory error detector
|
|
||||||
Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
|
|
||||||
Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
|
|
||||||
Command: ./indent -o /dev/null -fca indent.c
|
|
||||||
|
|
||||||
Source and destination overlap in memcpy(0x4c2c3c4, 0x4c2c3c9, 6)
|
|
||||||
at 0x4A0A230: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:882)
|
|
||||||
by 0x404EA7: print_comment (comments.c:857)
|
|
||||||
by 0x40EB92: handle_token_comment (handletoken.c:2119)
|
|
||||||
by 0x40EF38: handle_the_token (handletoken.c:2315)
|
|
||||||
by 0x401FDB: indent_main_loop (indent.c:628)
|
|
||||||
by 0x4021CD: indent (indent.c:715)
|
|
||||||
by 0x402869: indent_single_file (indent.c:960)
|
|
||||||
by 0x4028F1: indent_all (indent.c:992)
|
|
||||||
by 0x4029E5: main (indent.c:1054)
|
|
||||||
---
|
|
||||||
src/comments.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/comments.c b/src/comments.c
|
|
||||||
index 01776e8..2ee8fc6 100644
|
|
||||||
--- a/src/comments.c
|
|
||||||
+++ b/src/comments.c
|
|
||||||
@@ -854,7 +854,7 @@ begin_line:
|
|
||||||
save_length--;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) memcpy (e_com, save_ptr, save_length);
|
|
||||||
+ (void) memmove (e_com, save_ptr, save_length);
|
|
||||||
text_on_line = e_com;
|
|
||||||
e_com += save_length;
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.1.4
|
|
||||||
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
From 138fedaef6d94f7fe1601a6eba90d6354a7fb4dd Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Mon, 9 Nov 2015 10:09:57 +0100
|
|
||||||
Subject: [PATCH] Fix -nbdfa and -nbdfe typo
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
<http://lists.gnu.org/archive/html/bug-indent/2015-11/msg00000.html>
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
doc/indent.texinfo | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/doc/indent.texinfo b/doc/indent.texinfo
|
|
||||||
index 08f35f6..50aaf61 100644
|
|
||||||
--- a/doc/indent.texinfo
|
|
||||||
+++ b/doc/indent.texinfo
|
|
||||||
@@ -1048,7 +1048,7 @@ appear at one indention level deeper than the function declaration. This
|
|
||||||
is particularly helpful for functions with long argument lists.
|
|
||||||
The option @option{-bfde} causes a newline to be forced before the closing
|
|
||||||
bracket of the function declaration. For both options the 'n' setting is the default:
|
|
||||||
--nbdfa and -nbdfe.
|
|
||||||
+-nbfda and -nbfde.
|
|
||||||
|
|
||||||
|
|
||||||
For
|
|
||||||
--
|
|
||||||
2.4.3
|
|
||||||
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
From 7df0983c326f406dddbcc7c98dce72d5174d2a3c Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Wed, 18 Mar 2015 18:30:01 +0100
|
|
||||||
Subject: [PATCH] Modernize texi2html arguments
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
texi2html-5.0 complains on -number argument:
|
|
||||||
|
|
||||||
Option number is ambiguous (number-footnotes, number-sections)
|
|
||||||
|
|
||||||
This patch updates texi2html arguments to comply with texi2html-5.0.
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
|
|
||||||
diff --git a/doc/Makefile.am b/doc/Makefile.am
|
|
||||||
index d1fb09a..5eb9dc0 100644
|
|
||||||
--- a/doc/Makefile.am
|
|
||||||
+++ b/doc/Makefile.am
|
|
||||||
@@ -34,14 +34,14 @@ html-monolithic: @PACKAGE@.html
|
|
||||||
html-split: @PACKAGE@_toc.html
|
|
||||||
|
|
||||||
@PACKAGE@.html: version.texi $(@PACKAGE@_TEXINFOS)
|
|
||||||
- $(TEXI2HTML) -expandinfo -number -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi`
|
|
||||||
+ $(TEXI2HTML) -expand info -number-sections -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi`
|
|
||||||
|
|
||||||
@PACKAGE@_toc.html: version.texi $(@PACKAGE@_TEXINFOS)
|
|
||||||
case "$(TEXI2HTML)" in \
|
|
||||||
*"/missing texi2html") \
|
|
||||||
- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \
|
|
||||||
+ $(TEXI2HTML) -expand info -number-sections -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \
|
|
||||||
*) $(RM) @PACKAGE@_*.html ; \
|
|
||||||
- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \
|
|
||||||
+ $(TEXI2HTML) -expand info -number-sections -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \
|
|
||||||
esac
|
|
||||||
|
|
||||||
install-html-monolithic: @PACKAGE@.html
|
|
||||||
--
|
|
||||||
2.1.0
|
|
||||||
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
From c0001598a2b5b4cc8739beeb183f0d3f9c6a1d84 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Thu, 2 Feb 2012 17:12:44 +0100
|
|
||||||
Subject: [PATCH] Return non-zero exit code on tests failure
|
|
||||||
|
|
||||||
---
|
|
||||||
regression/TEST | 1 +
|
|
||||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/regression/TEST b/regression/TEST
|
|
||||||
index c860ef2..620e77f 100755
|
|
||||||
--- a/regression/TEST
|
|
||||||
+++ b/regression/TEST
|
|
||||||
@@ -441,6 +441,7 @@ then
|
|
||||||
cat $ERR
|
|
||||||
echo '**** Errors occured: ./output not removed'
|
|
||||||
echo
|
|
||||||
+ exit 1
|
|
||||||
else
|
|
||||||
cd ..
|
|
||||||
ls -l output
|
|
||||||
--
|
|
||||||
1.7.7.6
|
|
||||||
|
|
||||||
@ -1,166 +0,0 @@
|
|||||||
From 582ad604b72f1ce3c8d00ac0e964f28a8d615604 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Wed, 18 Mar 2015 16:29:49 +0100
|
|
||||||
Subject: [PATCH] Support hexadecimal floats
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
regression/TEST | 2 +-
|
|
||||||
regression/input/hexadecimal_float.c | 17 +++++++++
|
|
||||||
regression/standard/hexadecimal_float.c | 17 +++++++++
|
|
||||||
src/lexi.c | 63 ++++++++++++++++-----------------
|
|
||||||
4 files changed, 66 insertions(+), 33 deletions(-)
|
|
||||||
create mode 100644 regression/input/hexadecimal_float.c
|
|
||||||
create mode 100644 regression/standard/hexadecimal_float.c
|
|
||||||
|
|
||||||
diff --git a/regression/TEST b/regression/TEST
|
|
||||||
index 480ef7c..7db4c36 100755
|
|
||||||
--- a/regression/TEST
|
|
||||||
+++ b/regression/TEST
|
|
||||||
@@ -36,7 +36,7 @@ EXAMPLES="do.c else.c for.c func-def.c lshift.c ncs.c \
|
|
||||||
BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \
|
|
||||||
one-line-4.c struct-decl.c sizeof-in-while.c line-break-comment.c \
|
|
||||||
macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \
|
|
||||||
- float-constant-suffix.c"
|
|
||||||
+ float-constant-suffix.c hexadecimal_float.c"
|
|
||||||
|
|
||||||
INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \
|
|
||||||
indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \
|
|
||||||
diff --git a/regression/input/hexadecimal_float.c b/regression/input/hexadecimal_float.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..34c52cd
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/regression/input/hexadecimal_float.c
|
|
||||||
@@ -0,0 +1,17 @@
|
|
||||||
+/* Hexadecimal */
|
|
||||||
+double xpi = 0x1.921fb54442d18p+1;
|
|
||||||
+double xa = 0xe.fp-1;
|
|
||||||
+double xb = 0xe.fP-1;
|
|
||||||
+double xc = 0xf.P+1;
|
|
||||||
+double xd = 0x.fP+1;
|
|
||||||
+/* hexadecimal floats must have exponent part */
|
|
||||||
+
|
|
||||||
+/* Decimal */
|
|
||||||
+double dpi = 3.141592653589793e+0;
|
|
||||||
+double da = 1.2e-1;
|
|
||||||
+double db = 1.2E-1;
|
|
||||||
+double dc = 1.E+1;
|
|
||||||
+double dd = .1E+1;
|
|
||||||
+double de = 1.2;
|
|
||||||
+double df = 1.;
|
|
||||||
+double dg = .1;
|
|
||||||
diff --git a/regression/standard/hexadecimal_float.c b/regression/standard/hexadecimal_float.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..34c52cd
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/regression/standard/hexadecimal_float.c
|
|
||||||
@@ -0,0 +1,17 @@
|
|
||||||
+/* Hexadecimal */
|
|
||||||
+double xpi = 0x1.921fb54442d18p+1;
|
|
||||||
+double xa = 0xe.fp-1;
|
|
||||||
+double xb = 0xe.fP-1;
|
|
||||||
+double xc = 0xf.P+1;
|
|
||||||
+double xd = 0x.fP+1;
|
|
||||||
+/* hexadecimal floats must have exponent part */
|
|
||||||
+
|
|
||||||
+/* Decimal */
|
|
||||||
+double dpi = 3.141592653589793e+0;
|
|
||||||
+double da = 1.2e-1;
|
|
||||||
+double db = 1.2E-1;
|
|
||||||
+double dc = 1.E+1;
|
|
||||||
+double dd = .1E+1;
|
|
||||||
+double de = 1.2;
|
|
||||||
+double df = 1.;
|
|
||||||
+double dg = .1;
|
|
||||||
diff --git a/src/lexi.c b/src/lexi.c
|
|
||||||
index 0a98059..21e2c24 100644
|
|
||||||
--- a/src/lexi.c
|
|
||||||
+++ b/src/lexi.c
|
|
||||||
@@ -267,50 +267,49 @@ extern codes_ty lexi(void)
|
|
||||||
if (isdigit (*buf_ptr) ||
|
|
||||||
((buf_ptr[0] == '.') && isdigit (buf_ptr[1])))
|
|
||||||
{
|
|
||||||
- int seendot = 0, seenexp = 0;
|
|
||||||
+ int seendot = 0, seenexp = 0, ishexa = 0;
|
|
||||||
|
|
||||||
if ((*buf_ptr == '0') && ((buf_ptr[1] == 'x') || (buf_ptr[1] == 'X')))
|
|
||||||
{
|
|
||||||
- buf_ptr += 2;
|
|
||||||
- while (isxdigit (*buf_ptr))
|
|
||||||
- {
|
|
||||||
- buf_ptr++;
|
|
||||||
- }
|
|
||||||
+ ishexa = 1;
|
|
||||||
+ buf_ptr += 1;
|
|
||||||
}
|
|
||||||
- else
|
|
||||||
+ while (1)
|
|
||||||
{
|
|
||||||
- while (1)
|
|
||||||
+ if (*buf_ptr == '.')
|
|
||||||
{
|
|
||||||
- if (*buf_ptr == '.')
|
|
||||||
+ if (seendot)
|
|
||||||
{
|
|
||||||
- if (seendot)
|
|
||||||
- {
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- {
|
|
||||||
- seendot++;
|
|
||||||
- }
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ seendot++;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- buf_ptr++;
|
|
||||||
-
|
|
||||||
- if (!isdigit (*buf_ptr) && *buf_ptr != '.')
|
|
||||||
+ buf_ptr++;
|
|
||||||
+
|
|
||||||
+ if (!(ishexa && !seenexp ?
|
|
||||||
+ isxdigit (*buf_ptr) : isdigit (*buf_ptr)
|
|
||||||
+ ) && *buf_ptr != '.')
|
|
||||||
+ {
|
|
||||||
+ if ((ishexa ?
|
|
||||||
+ (*buf_ptr != 'P' && *buf_ptr != 'p') :
|
|
||||||
+ (*buf_ptr != 'E' && *buf_ptr != 'e')
|
|
||||||
+ ) || seenexp)
|
|
||||||
{
|
|
||||||
- if ((*buf_ptr != 'E' && *buf_ptr != 'e') || seenexp)
|
|
||||||
- {
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ seenexp++;
|
|
||||||
+ seendot++;
|
|
||||||
+ buf_ptr++;
|
|
||||||
+
|
|
||||||
+ if (*buf_ptr == '+' || *buf_ptr == '-')
|
|
||||||
{
|
|
||||||
- seenexp++;
|
|
||||||
- seendot++;
|
|
||||||
buf_ptr++;
|
|
||||||
-
|
|
||||||
- if (*buf_ptr == '+' || *buf_ptr == '-')
|
|
||||||
- {
|
|
||||||
- buf_ptr++;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.1.0
|
|
||||||
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
From 5ddb9821391e7417bddd4388f78e810ea15a39d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Thu, 2 Apr 2015 16:14:12 +0200
|
|
||||||
Subject: [PATCH] doc: Correct a typo about enabling control comment
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
<http://lists.gnu.org/archive/html/bug-indent/2015-04/msg00000.html>
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
doc/indent.texinfo | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/doc/indent.texinfo b/doc/indent.texinfo
|
|
||||||
index 08f35f6..15627e0 100644
|
|
||||||
--- a/doc/indent.texinfo
|
|
||||||
+++ b/doc/indent.texinfo
|
|
||||||
@@ -1463,7 +1463,7 @@ formatting for a section of a program, place the disabling control
|
|
||||||
comment @code{/* *INDENT-OFF* */} on a line by itself just before that
|
|
||||||
section. Program text scanned after this control comment is output
|
|
||||||
precisely as input with no modifications until the corresponding
|
|
||||||
-enabling comment is scanned on a line by itself. The disabling control
|
|
||||||
+enabling comment is scanned on a line by itself. The enabling control
|
|
||||||
comment is @code{/* *INDENT-ON* */}, and any text following the comment
|
|
||||||
on the line is also output unformatted. Formatting begins again with
|
|
||||||
the input line following the enabling control comment.
|
|
||||||
--
|
|
||||||
2.1.0
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
indent-2.2.13.tar.xz
Normal file
BIN
indent-2.2.13.tar.xz
Normal file
Binary file not shown.
@ -1,12 +0,0 @@
|
|||||||
diff -burp indent-2.2.9/src/indent.c indent-2.2.9-lcall/src/indent.c
|
|
||||||
--- indent-2.2.9/src/indent.c 2006-02-01 14:20:25.000000000 +0100
|
|
||||||
+++ indent-2.2.9-lcall/src/indent.c 2006-02-01 14:08:52.000000000 +0100
|
|
||||||
@@ -3070,7 +3070,7 @@ int main (
|
|
||||||
exit_values_ty exit_status;
|
|
||||||
|
|
||||||
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) && defined (HAVE_LCCTYPES)
|
|
||||||
- setlocale(LC_MESSAGES, "");
|
|
||||||
+ setlocale(LC_ALL, "");
|
|
||||||
#endif
|
|
||||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
|
||||||
textdomain(PACKAGE);
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
Only in indent-2.2.9/doc: all_opts
|
|
||||||
diff -Bburpd indent-2.2.9-orig/doc/indent.texinfo indent-2.2.9/doc/indent.texinfo
|
|
||||||
--- indent-2.2.9-orig/doc/indent.texinfo 2006-07-16 07:25:25.000000000 -0400
|
|
||||||
+++ indent-2.2.9/doc/indent.texinfo 2006-07-16 07:57:33.000000000 -0400
|
|
||||||
@@ -754,7 +754,7 @@ if (x > 0)
|
|
||||||
|
|
||||||
@kindex -ce
|
|
||||||
@kindex --cuddle-else
|
|
||||||
-@kindex -dce
|
|
||||||
+@kindex -nce
|
|
||||||
@kindex --dont-cuddle-else
|
|
||||||
If you are using the @option{-br} option, you probably want to also use
|
|
||||||
the @option{-ce} option. This causes the @code{else} in an if-then-else
|
|
||||||
@@ -1666,6 +1666,11 @@ Line up continued lines at parentheses.@
|
|
||||||
Leave space between @samp{#} and preprocessor directive.@*
|
|
||||||
@xref{Indentation}.
|
|
||||||
|
|
||||||
+@item -nlps
|
|
||||||
+@itemx --remove-preprocessor-space
|
|
||||||
+Remove space between @samp{#} and preprocessor directive.@*
|
|
||||||
+@xref{Indentation}.
|
|
||||||
+
|
|
||||||
@item -nbad
|
|
||||||
@itemx --no-blank-lines-after-declarations
|
|
||||||
Do not force blank lines after declarations.@*
|
|
||||||
@@ -1979,6 +1989,7 @@ the corresponding short option.
|
|
||||||
\line{ --preprocessor-indentation \leaderfill -ppi@var{n}\ }
|
|
||||||
\line{ --preserve-mtime \leaderfill -pmt\ }
|
|
||||||
\line{ --procnames-start-lines \leaderfill -psl\ }
|
|
||||||
+\line{ --remove-preprocessor-space \leaderfill -nlps\ }
|
|
||||||
\line{ --space-after-cast \leaderfill -cs\ \ }
|
|
||||||
\line{ --space-after-for \leaderfill -saf\ }
|
|
||||||
\line{ --space-after-if \leaderfill -sai\ }
|
|
||||||
@@ -2063,6 +2075,7 @@ the corresponding short option.
|
|
||||||
--preserve-mtime -pmt
|
|
||||||
--preprocessor-indentation -ppi@var{n}
|
|
||||||
--procnames-start-lines -psl
|
|
||||||
+--remove-preprocessor-space -nlps
|
|
||||||
--space-after-cast -cs
|
|
||||||
--space-after-for -saf
|
|
||||||
--space-after-if -sai
|
|
||||||
46
indent.spec
46
indent.spec
@ -1,24 +1,16 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
%define _binaries_in_noarch_packages_terminate_build 0
|
||||||
Name: indent
|
Name: indent
|
||||||
Summary: A tool to make code easier to read
|
Summary: A tool to make code easier to read
|
||||||
Version: 2.2.11
|
Version: 2.2.13
|
||||||
Release: 27
|
Release: 3
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/%{name}/
|
URL: http://www.gnu.org/software/%{name}/
|
||||||
|
Source: http://ftp.gnu.org/gnu/indent/%{name}-%{version}.tar.xz
|
||||||
Source: http://indent.isidore-it.eu/%{name}-%{version}.tar.gz
|
Patch0: fix-an-out-of-buffer-read-CVE-2023-40305.patch
|
||||||
|
Patch1: fix-a-heap-buffer-overwrite-CVE-2023-40305.patch
|
||||||
Patch5: indent-2.2.9-lcall.patch
|
# https://lists.gnu.org/archive/html/bug-indent/2024-01/msg00001.html
|
||||||
Patch7: indent-2.2.9-man.patch
|
Patch2: CVE-2024-0911.patch
|
||||||
Patch8: indent-2.2.11-Do-not-split-decimal-float-suffix-from-constant.patch
|
|
||||||
Patch9: indent-2.2.11-Return-non-zero-exit-code-on-tests-failure.patch
|
|
||||||
Patch10: indent-2.2.11-Fix-compiler-warnings.patch
|
|
||||||
Patch11: indent-2.2.11-Allow-64-bit-stat.patch
|
|
||||||
Patch12: indent-2.2.11-Fix-copying-overlapping-comment.patch
|
|
||||||
Patch13: indent-2.2.11-Support-hexadecimal-floats.patch
|
|
||||||
Patch14: indent-2.2.11-Modernize-texi2html-arguments.patch
|
|
||||||
Patch15: indent-2.2.11-doc-Correct-a-typo-about-enabling-control-comment.patch
|
|
||||||
Patch16: indent-2.2.11-Fix-nbdfa-and-nbdfe-typo.patch
|
|
||||||
|
|
||||||
BuildRequires: gettext-devel automake gcc autoconf
|
BuildRequires: gettext-devel automake gcc autoconf
|
||||||
BuildRequires: make coreutils gperf texinfo texi2html
|
BuildRequires: make coreutils gperf texinfo texi2html
|
||||||
@ -46,21 +38,31 @@ autoreconf -i -f
|
|||||||
%find_lang %name
|
%find_lang %name
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make -C regression
|
make check %{?_smp_mflags}
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/indent
|
||||||
%exclude %{_bindir}/texinfo2man
|
%{_datadir}/doc/%{name}/%{name}.html
|
||||||
%exclude %{_prefix}/doc/%{name}/%{name}.html
|
|
||||||
%exclude %{_prefix}/lib/debug/usr/bin/texinfo2man-%{version}-%{release}.aarch64.debug
|
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc AUTHORS NEWS README ChangeLog*
|
%doc AUTHORS NEWS README.md ChangeLog*
|
||||||
%{_mandir}/man1/%{name}.*
|
%{_mandir}/man1/%{name}.*
|
||||||
%{_infodir}/%{name}.info*
|
%{_infodir}/%{name}.info*
|
||||||
%exclude %{_infodir}/dir
|
%exclude %{_infodir}/dir
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 05 2024 yaoxin <yao_xin001@hoperun.com> - 2.2.13-3
|
||||||
|
- Fix CVE-2024-0911
|
||||||
|
|
||||||
|
* Tue Aug 29 2023 wangkai <13474090681@163.com> - 2.2.13-2
|
||||||
|
- Fix CVE-2023-40305
|
||||||
|
|
||||||
|
* Mon Apr 24 2023 xu_ping <707078654@qq.com> - 2.2.13-1
|
||||||
|
- Upgrade package to 2.2.13 version
|
||||||
|
|
||||||
|
* Thu Sep 10 2020 baizhonggui<baizhonggui@huawei.com> - 2.2.11-28
|
||||||
|
- fix source0
|
||||||
|
|
||||||
* Tue Dec 3 2019 caomeng<caomeng5@huawei.com> - 2.2.11-27
|
* Tue Dec 3 2019 caomeng<caomeng5@huawei.com> - 2.2.11-27
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
4
indent.yaml
Normal file
4
indent.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: thentenaar/indent
|
||||||
|
tag_prefix: "^"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user