Skip to content

various fixes #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/avra.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ void write_map_file(struct prog_info *pi);
char *Space(char *n);

/* stdextra.c */
char *nocase_strcmp(const char *s, const char *t);
char *nocase_strncmp(char *s, char *t, int n);
int nocase_strcmp(const char *s, const char *t);
int nocase_strncmp(char *s, char *t, int n);
char *nocase_strstr(char *s, char *t);
int atox(char *s);
int atoi_n(char *s, int n);
Expand Down
2 changes: 1 addition & 1 deletion src/coff.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ stab_add_filename(char *pName, char *pLabel)
if (n <= FILNMLEN) {
/* inline filename */
memset(pAux->x_file.x_fname, 0, FILNMLEN);
strncpy(pAux->x_file.x_fname, pName, n); /* might not be zero terminated */
memcpy(pAux->x_file.x_fname, pName, n); /* might not be zero terminated */
} else {
pAux->x_file.x_n.x_zeroes = 0; /* symbol name is in string table */
pAux->x_file.x_n.x_offset = ci->ListOfStrings.TotalBytes;
Expand Down
2 changes: 1 addition & 1 deletion src/makefiles/Makefile.linux
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CC ?= gcc
CFLAGS ?= -Wall -O3
CFLAGS += $(CDEFS)
override CFLAGS += $(CDEFS)
LDFLAGS ?= -s

SOURCES = avra.c \
Expand Down
4 changes: 2 additions & 2 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ parse_line(struct prog_info *pi, char *line)
/* Filter out .stab debugging information */
/* .stabs sometimes contains colon : symbol - might be interpreted as label */
if (*line == '.') { /* minimal slowdown of existing code */
if (strncmp(temp,".stabs ",7) == 0) { /* compiler output is always lower case */
if (strncmp(line,".stabs ",7) == 0) { /* compiler output is always lower case */
strcpy(temp,line); /* TODO : Do we need this temp variable ? Please check */
return parse_stabs(pi, temp);
}
if (strncmp(temp,".stabn ",7) == 0) {
if (strncmp(line,".stabn ",7) == 0) {
strcpy(temp,line);
return parse_stabn(pi, temp);
}
Expand Down