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, master has been updated via 3bb9a745b549da26be3607724212da3e202763a1 (commit) via 95ef7be8dfd4c18ffa419bac6eeb3b0e4ea414e1 (commit) via 7db3e17a4aa5cd7e8b1b9e1e9e53495aafa169ca (commit) from 9692499b2a87f1bdcebd8e1fd8e4f40084c898ba (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 3bb9a745b549da26be3607724212da3e202763a1 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jan 2 14:44:55 2015 +0100
Ship bash with Core Update 86 again
It seems that some systems installed some pre-versions of the distribution which came with an outdated version of bash. Since this update uses some scripts that use bash-4-isms, we ship the shell once again.
An other reason is that there have been security fixes in the shell which should be fixed on all systems.
commit 95ef7be8dfd4c18ffa419bac6eeb3b0e4ea414e1 Merge: 7db3e17 9692499 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jan 2 14:44:37 2015 +0100
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-2.x
commit 7db3e17a4aa5cd7e8b1b9e1e9e53495aafa169ca Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jan 2 14:41:33 2015 +0100
installer: Fix crash with small screen resolutions
The installer is showing a help line at the bottom of the screen which is in some languages rather long. If it is longer than the width of the screen, the installer used to crash which is now fixed in this patch.
-----------------------------------------------------------------------
Summary of changes: .../{oldcore/84 => core/86}/filelists/bash | 0 src/installer/main.c | 36 +++++++++++++++------- 2 files changed, 25 insertions(+), 11 deletions(-) copy config/rootfiles/{oldcore/84 => core/86}/filelists/bash (100%)
Difference in files: diff --git a/config/rootfiles/core/86/filelists/bash b/config/rootfiles/core/86/filelists/bash new file mode 120000 index 0000000..de970cb --- /dev/null +++ b/config/rootfiles/core/86/filelists/bash @@ -0,0 +1 @@ +../../../common/bash \ No newline at end of file diff --git a/src/installer/main.c b/src/installer/main.c index ab2cb89..c97776d 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -216,19 +216,31 @@ static char* get_system_release() { }
static char* center_string(const char* str, int width) { + if (!str) + return NULL; + + char* string = NULL; unsigned int str_len = strlen(str);
- unsigned int indent_length = (width - str_len) / 2; - char indent[indent_length + 1]; + if (str_len == width) { + string = strdup(str);
- for (unsigned int i = 0; i < indent_length; i++) { - indent[i] = ' '; - } - indent[indent_length] = '\0'; + } else if (str_len > width) { + string = strdup(str); + string[width - 1] = '\0';
- char* string = NULL; - if (asprintf(&string, "%s%s", indent, str) < 0) - return NULL; + } else { + unsigned int indent_length = (width - str_len) / 2; + char indent[indent_length + 1]; + + for (unsigned int i = 0; i < indent_length; i++) { + indent[i] = ' '; + } + indent[indent_length] = '\0'; + + if (asprintf(&string, "%s%s", indent, str) < 0) + return NULL; + }
return string; } @@ -377,7 +389,8 @@ int main(int argc, char *argv[]) {
// Draw title char* roottext = center_string(system_release, screen_cols); - newtDrawRootText(0, 0, roottext); + if (roottext) + newtDrawRootText(0, 0, roottext);
snprintf(title, sizeof(title), "%s - %s", NAME, SLOGAN);
@@ -423,7 +436,8 @@ int main(int argc, char *argv[]) { else helpline = center_string(_("<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen"), screen_cols);
- newtPushHelpLine(helpline); + if (helpline) + newtPushHelpLine(helpline);
if (!config.unattended) { snprintf(message, sizeof(message),
hooks/post-receive -- IPFire 2.x development tree