aboutsummaryrefslogtreecommitdiff
path: root/documentation/libelf-by-example/prog4.txt
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/libelf-by-example/prog4.txt')
-rw-r--r--documentation/libelf-by-example/prog4.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/documentation/libelf-by-example/prog4.txt b/documentation/libelf-by-example/prog4.txt
index 465f9df595d7..919e4f5dc1aa 100644
--- a/documentation/libelf-by-example/prog4.txt
+++ b/documentation/libelf-by-example/prog4.txt
@@ -1,7 +1,7 @@
/*
* Print the names of ELF sections.
*
- * $Id: prog4.txt 2133 2011-11-10 08:28:22Z jkoshy $
+ * $Id: prog4.txt 3687 2019-02-22 07:55:09Z jkoshy $
*/
#include <err.h>
@@ -18,11 +18,11 @@ main(int argc, char **argv)
{
int fd;
Elf *e;
- char *name, *p, pc[4*sizeof(char)];
Elf_Scn *scn;
Elf_Data *data;
GElf_Shdr shdr;
size_t n, shstrndx, sz;
+ char *name, *p, pc[(4 * sizeof(char)) + 1];
if (argc != 2)
errx(EXIT_FAILURE, "usage: %s file-name", argv[0]);