public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 46ce813e330925e0ab5969cf3e34c9e49fb9df88
Date: Thu, 10 Mar 2016 20:02:55 +0000	[thread overview]
Message-ID: <20160310200256.8502B1081BC7@git01.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2411 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  46ce813e330925e0ab5969cf3e34c9e49fb9df88 (commit)
      from  9ef4bbf7032d6727a6debc10702e9beacd0b097d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 46ce813e330925e0ab5969cf3e34c9e49fb9df88
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Thu Mar 10 19:22:04 2016 +0000

    setup: Fix segmentation fault with more than four NICs found
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 src/setup/netstuff.c | 8 ++++----
 src/setup/setup.h    | 2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

Difference in files:
diff --git a/src/setup/netstuff.c b/src/setup/netstuff.c
index f5b3849..240306e 100644
--- a/src/setup/netstuff.c
+++ b/src/setup/netstuff.c
@@ -601,16 +601,16 @@ int scan_network_cards(void)
 int nicmenu(int colour)
 {
 	int rc, choise = 0, count = 0, kcount = 0, mcount = 0, i, j, nic_in_use;
-	int found_NIC_as_Card[4];
+	int found_NIC_as_Card[MAX_NICS];
 	char message[STRING_SIZE];
 	char temp[STRING_SIZE];
 
 	char cMenuInhalt[STRING_SIZE];
-	char MenuInhalt[20][180];
-	char *pMenuInhalt[20];
+	char MenuInhalt[MAX_NICS][STRING_SIZE];
+	char *pMenuInhalt[MAX_NICS];
 	
 	while (strcmp(nics[count].macaddr, "")) count++;			// 2 find how many nics in system
-	for ( i=0 ; i<4;i++) if (strcmp(knics[i].macaddr, "")) kcount++;	// loop to find all knowing nics
+	for (i=0; i<MAX_NICS; i++) if (strcmp(knics[i].macaddr, "")) kcount++;	// loop to find all knowing nics
 
 	// If new nics are found...
 	if (count > kcount) {
diff --git a/src/setup/setup.h b/src/setup/setup.h
index 14fd646..a368b78 100644
--- a/src/setup/setup.h
+++ b/src/setup/setup.h
@@ -55,6 +55,8 @@ int handletimezone(void);
 #define _ORANGE_CARD_ 2
 #define _BLUE_CARD_ 3
 
+#define MAX_NICS 20
+
 struct nic
 {
 	char driver[80];


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2016-03-10 20:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160310200256.8502B1081BC7@git01.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox