[axel-commits] r106 - in /branches/2.x: CHANGES Makefile axel.1 axel.c axel.spec configure de.po gui/kapt/axel-kapt http.c nl.po ru.po text.c zh_CN.po zh_cn.po

appaji at users.alioth.debian.org appaji at users.alioth.debian.org
Mon Apr 27 13:45:53 UTC 2009


Author: appaji
Date: Mon Apr 27 13:45:53 2009
New Revision: 106

URL: http://svn.debian.org/wsvn/axel/?sc=1&rev=106
Log:
Merge from trunk and prepare for 2.4

Added:
    branches/2.x/zh_CN.po
      - copied, changed from r102, branches/2.x/zh_cn.po
Removed:
    branches/2.x/axel.spec
    branches/2.x/zh_cn.po
Modified:
    branches/2.x/CHANGES
    branches/2.x/Makefile
    branches/2.x/axel.1
    branches/2.x/axel.c
    branches/2.x/configure
    branches/2.x/de.po
    branches/2.x/gui/kapt/axel-kapt
    branches/2.x/http.c
    branches/2.x/nl.po
    branches/2.x/ru.po
    branches/2.x/text.c

Modified: branches/2.x/CHANGES
URL: http://svn.debian.org/wsvn/axel/branches/2.x/CHANGES?rev=106&op=diff
==============================================================================
--- branches/2.x/CHANGES (original)
+++ branches/2.x/CHANGES Mon Apr 27 13:45:53 2009
@@ -1,3 +1,12 @@
+Version 2.4
+
+- Fix a buffer overflow caused by wrong size limits  when copying strings (Closes: #311569), thanks Michael Schwendt and the Fedora project members
+- Fix thread hangups due to incorrect synchronization (Closes: #311469), thanks Yao Shi
+- Removed Fedora packaging file. axel will be available in the Fedora repositories soon.
+- Use /etc/ instead of /usr/etc/ as the default system-wide configuration location.
+- Respect environment CFLAGS in configure.
+- Allow special characters in arguments to configure.
+
 Version 2.3
 
 - Wait for thread termination in axel.c:axel_do (Closes: #311255), thanks John Ripa

Modified: branches/2.x/Makefile
URL: http://svn.debian.org/wsvn/axel/branches/2.x/Makefile?rev=106&op=diff
==============================================================================
--- branches/2.x/Makefile (original)
+++ branches/2.x/Makefile Mon Apr 27 13:45:53 2009
@@ -12,7 +12,7 @@
 .SUFFIXES: .po .mo
 
 # Add your translation here..
-MOFILES = nl.mo de.mo ru.mo zh_cn.mo
+MOFILES = nl.mo de.mo ru.mo zh_CN.mo
 
 
 all: $(OUTFILE)

Modified: branches/2.x/axel.1
URL: http://svn.debian.org/wsvn/axel/branches/2.x/axel.1?rev=106&op=diff
==============================================================================
--- branches/2.x/axel.1 (original)
+++ branches/2.x/axel.1 Mon Apr 27 13:45:53 2009
@@ -129,7 +129,8 @@
 
 .SH FILES
 .PP
-\fI/etc/axelrc\fP System-wide configuration file
+\fI/etc/axelrc\fP System-wide configuration file. Note that development versions
+place this file in /usr/local/etc.
 .PP
 \fI~/.axelrc\fP Personal configuration file
 .PP

Modified: branches/2.x/axel.c
URL: http://svn.debian.org/wsvn/axel/branches/2.x/axel.c?rev=106&op=diff
==============================================================================
--- branches/2.x/axel.c (original)
+++ branches/2.x/axel.c Mon Apr 27 13:45:53 2009
@@ -238,8 +238,12 @@
 	if( axel->conn[i].currentbyte <= axel->conn[i].lastbyte )
 	{
 		if( axel->conf->verbose >= 2 )
+		{
 			axel_message( axel, _("Connection %i downloading from %s:%i using interface %s"),
 		        	      i, axel->conn[i].host, axel->conn[i].port, axel->conn[i].local_if );
+		}
+		
+		axel->conn[i].state = 1;
 		if( pthread_create( axel->conn[i].setup_thread, NULL, setup_thread, &axel->conn[i] ) != 0 )
 		{
 			axel_message( axel, _("pthread error!!!") );
@@ -248,7 +252,6 @@
 		else
 		{
 			axel->conn[i].last_transfer = gettime();
-			axel->conn[i].state = 1;
 		}
 	}
 	
@@ -397,9 +400,10 @@
 				if( axel->conf->verbose >= 2 )
 					axel_message( axel, _("Connection %i downloading from %s:%i using interface %s"),
 				        	      i, axel->conn[i].host, axel->conn[i].port, axel->conn[i].local_if );
+				
+				axel->conn[i].state = 1;
 				if( pthread_create( axel->conn[i].setup_thread, NULL, setup_thread, &axel->conn[i] ) == 0 )
 				{
-					axel->conn[i].state = 1;
 					axel->conn[i].last_transfer = gettime();
 				}
 				else

Modified: branches/2.x/configure
URL: http://svn.debian.org/wsvn/axel/branches/2.x/configure?rev=106&op=diff
==============================================================================
--- branches/2.x/configure (original)
+++ branches/2.x/configure Mon Apr 27 13:45:53 2009
@@ -12,7 +12,7 @@
 mandir='$prefix/share/man'
 locale='$prefix/share/locale'
 
-i18n=0
+i18n=1
 debug=0
 strip=1
 
@@ -40,7 +40,11 @@
 EOF
 		exit;
 	fi
-	eval "$e"
+	
+	keyname=$(expr "$e" : '\(.*\)=.*' | sed 's/[^a-z0-9_]/_/g')
+	value=$(expr "$e" : '.*=\(.*\)' | sed "s/'/_/g")
+	
+	eval "$keyname='$value'"
 	shift;
 done
 
@@ -49,6 +53,10 @@
 etcdir=`eval echo $etcdir`
 mandir=`eval echo $mandir`
 locale=`eval echo $locale`
+if test "$etcdir" = "/usr/etc"; then
+	# FHS explicitely forbids /usr/etc
+	etcdir='/etc'
+fi
 
 cat<<EOF>Makefile.settings
 ## Axel settings, generated by configure
@@ -85,8 +93,9 @@
 	fi;
 fi
 
-echo 'CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -Os' >> Makefile.settings
+echo "CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os ${CFLAGS}" >> Makefile.settings
 if [ "$debug" = "1" ]; then
+	echo 'CFLAGS+=-g' >> Makefile.settings
 	echo 'DEBUG=1' >> Makefile.settings
 	echo '#define DEBUG' >> config.h;
 fi

Modified: branches/2.x/de.po
URL: http://svn.debian.org/wsvn/axel/branches/2.x/de.po?rev=106&op=diff
==============================================================================
--- branches/2.x/de.po (original)
+++ branches/2.x/de.po Mon Apr 27 13:45:53 2009
@@ -2,7 +2,7 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-05 11:14+0530\n"
+"POT-Creation-Date: 2009-04-27 13:21+0530\n"
 "PO-Revision-Date: 2008-09-15 22:08+0200\n"
 "Last-Translator: Hermann J. Beckers <hj.beckers at onlinehome.de>\n"
 "Language-Team: deutsch <de at li.org>\n"
@@ -50,35 +50,35 @@
 msgid "Starting download"
 msgstr "Starte Abruf"
 
-#: axel.c:241 axel.c:398
+#: axel.c:242 axel.c:401
 #, c-format
 msgid "Connection %i downloading from %s:%i using interface %s"
 msgstr "Verbindung %i: Abruf von %s:%i über Schnittstelle %s"
 
-#: axel.c:245 axel.c:407
+#: axel.c:249 axel.c:411
 msgid "pthread error!!!"
 msgstr "pthread Fehler!!!"
 
-#: axel.c:314
+#: axel.c:317
 #, c-format
 msgid "Error on connection %i! Connection closed"
 msgstr "Fehler bei Verbindung %i! Verbindung getrennt"
 
-#: axel.c:328
+#: axel.c:331
 #, c-format
 msgid "Connection %i unexpectedly closed"
 msgstr "Verbindung %i unerwartet getrennt"
 
-#: axel.c:332 axel.c:349
+#: axel.c:335 axel.c:352
 #, c-format
 msgid "Connection %i finished"
 msgstr "Verbindung %i beendet"
 
-#: axel.c:361
+#: axel.c:364
 msgid "Write error!"
 msgstr "Schreibfehler!"
 
-#: axel.c:373
+#: axel.c:376
 #, c-format
 msgid "Connection %i timed out"
 msgstr "Time-out bei Verbindung %i"
@@ -143,47 +143,57 @@
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "Kann Standardausgabe nicht nach /dev/null umleiten.\n"
 
-#: text.c:182
+#: text.c:176
+#, c-format
+msgid "Error when trying to read URL (Too long?).\n"
+msgstr "Fehler beim Lesen der URL (Zu lang?).\n"
+
+#: text.c:185
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr "Kann URLs mit mehr als %d Zeichen nicht nutzen\n"
 
-#: text.c:187
+#: text.c:190
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "Starte Abruf: %s\n"
 
-#: text.c:194
+#: text.c:197
 #, c-format
 msgid "Doing search...\n"
 msgstr "Suche gestartet...\n"
 
-#: text.c:198
+#: text.c:201
 #, c-format
 msgid "File not found\n"
 msgstr "Datei nicht gefunden\n"
 
-#: text.c:202
+#: text.c:205
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "Teste Geschwindigkeiten, das kann etwas dauern...\n"
 
-#: text.c:207
+#: text.c:210
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "%i benutzbare Server gefunden, werde diese URLs benutzen:\n"
 
 #: text.c:269
 #, c-format
+msgid "Filename too long!\n"
+msgstr "Dateiname zu lang!\n"
+
+#: text.c:281
+#, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "Keine Status-Datei, Fortsetzung nicht möglich!\n"
 
-#: text.c:274
+#: text.c:286
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr "Status-Datei gefunden, aber noch nichts übertragen. Neustart.\n"
 
-#: text.c:405
+#: text.c:417
 #, c-format
 msgid ""
 "\n"
@@ -192,47 +202,47 @@
 "\n"
 "%s abgerufen in %s. (%.2f KB/s)\n"
 
-#: text.c:427
+#: text.c:439
 #, fuzzy, c-format
 msgid "%lld byte"
 msgstr "%i Byte"
 
-#: text.c:429
+#: text.c:441
 #, fuzzy, c-format
 msgid "%lld bytes"
 msgstr "%i Bytes"
 
-#: text.c:431
+#: text.c:443
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f Kilobytes"
 
-#: text.c:433
+#: text.c:445
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f Megabytes"
 
-#: text.c:442
+#: text.c:454
 #, c-format
 msgid "%i second"
 msgstr "%i Sekunde"
 
-#: text.c:444
+#: text.c:456
 #, c-format
 msgid "%i seconds"
 msgstr "%i Sekunden"
 
-#: text.c:446
+#: text.c:458
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i Sekunden"
 
-#: text.c:448
+#: text.c:460
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i Sekunden"
 
-#: text.c:528
+#: text.c:540
 #, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -268,7 +278,7 @@
 "\n"
 "Fehler an lintux at lintux.cx melden.\n"
 
-#: text.c:545
+#: text.c:557
 #, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -294,8 +304,8 @@
 "--num-connections=x\t-n x\tmaximale gleichzeitige Verbindungen\n"
 "--output=f\t\t-o f\tlokale Ausgabe-Datei\n"
 "--search=[x]\t\t-S [x]  Suche nach Spiegelservern und Abruf von x Servern\n"
-"--header=x\f\t-H x\tSende HTTP-Header\n"
-"--user-agent=x\f\t-U x\tSetze Browser-Kennung\n"
+"--header=x\t\t-H x\tSende HTTP-Header\n"
+"--user-agent=x\t\t-U x\tSetze Browser-Kennung\n"
 "--no-proxy\t\t-N\tkeinen Proxy-Server benutzen\n"
 "--quiet\t\t\t-q\tkeine Meldungen auf Standard-Ausgabe\n"
 "--verbose\t\t-v\tzusätzliche Status-Information\n"
@@ -304,7 +314,7 @@
 "\n"
 "Fehler an lintux at lintux.cx melden.\n"
 
-#: text.c:566
+#: text.c:578
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel Version %s (%s)\n"

Modified: branches/2.x/gui/kapt/axel-kapt
URL: http://svn.debian.org/wsvn/axel/branches/2.x/gui/kapt/axel-kapt?rev=106&op=diff
==============================================================================
--- branches/2.x/gui/kapt/axel-kapt (original)
+++ branches/2.x/gui/kapt/axel-kapt Mon Apr 27 13:45:53 2009
@@ -45,7 +45,7 @@
         verb "Verbose" -> @|" --verbose ";
         quiet "Quiet" -> @|" -q ";
 
-    term "Terminal Type" -> @combo("konsole", "rxvt", "xterm", "aterm");
+    term "Terminal Type" -> @string()="xterm";
     max "Max bps"-> @integer()=0;
     connex :horizontal "Connections" -> @integer()=4;
     search :framed "ftp Search" -> numsites | ! @ ;

Modified: branches/2.x/http.c
URL: http://svn.debian.org/wsvn/axel/branches/2.x/http.c?rev=106&op=diff
==============================================================================
--- branches/2.x/http.c (original)
+++ branches/2.x/http.c Mon Apr 27 13:45:53 2009
@@ -124,7 +124,7 @@
 	strcat( s, "\r\n" );
 	va_end( params );
 	
-	strncat( conn->request, s, MAX_QUERY );
+	strncat( conn->request, s, MAX_QUERY - strlen(conn->request) - 1);
 }
 
 int http_exec( http_t *conn )

Modified: branches/2.x/nl.po
URL: http://svn.debian.org/wsvn/axel/branches/2.x/nl.po?rev=106&op=diff
==============================================================================
--- branches/2.x/nl.po (original)
+++ branches/2.x/nl.po Mon Apr 27 13:45:53 2009
@@ -2,7 +2,7 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-05 11:14+0530\n"
+"POT-Creation-Date: 2009-04-27 13:21+0530\n"
 "PO-Revision-Date: 2001-11-14 15:22+0200\n"
 "Last-Translator: Wilmer van der Gaast <wilmer at gaast.net>\n"
 "Language-Team: Dutch <nl at li.org>\n"
@@ -49,35 +49,35 @@
 msgid "Starting download"
 msgstr "Begin download"
 
-#: axel.c:241 axel.c:398
+#: axel.c:242 axel.c:401
 #, c-format
 msgid "Connection %i downloading from %s:%i using interface %s"
 msgstr "Verbinding %i gebruikt server %s:%i via interface %s"
 
-#: axel.c:245 axel.c:407
+#: axel.c:249 axel.c:411
 msgid "pthread error!!!"
 msgstr "pthread fout!!!"
 
-#: axel.c:314
+#: axel.c:317
 #, c-format
 msgid "Error on connection %i! Connection closed"
 msgstr "Fout op verbinding %i! Verbinding gesloten"
 
-#: axel.c:328
+#: axel.c:331
 #, c-format
 msgid "Connection %i unexpectedly closed"
 msgstr "Verbinding %i onverwachts gesloten"
 
-#: axel.c:332 axel.c:349
+#: axel.c:335 axel.c:352
 #, c-format
 msgid "Connection %i finished"
 msgstr "Verbinding %i klaar"
 
-#: axel.c:361
+#: axel.c:364
 msgid "Write error!"
 msgstr "Schrijffout!"
 
-#: axel.c:373
+#: axel.c:376
 #, c-format
 msgid "Connection %i timed out"
 msgstr "Time-out op verbinding %i"
@@ -142,47 +142,57 @@
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "Fout bij het afsluiten van stdout.\n"
 
-#: text.c:182
+#: text.c:176
+#, c-format
+msgid "Error when trying to read URL (Too long?).\n"
+msgstr ""
+
+#: text.c:185
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr ""
 
-#: text.c:187
+#: text.c:190
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "Begin download: %s\n"
 
-#: text.c:194
+#: text.c:197
 #, c-format
 msgid "Doing search...\n"
 msgstr "Zoeken...\n"
 
-#: text.c:198
+#: text.c:201
 #, c-format
 msgid "File not found\n"
 msgstr "Bestand niet gevonden\n"
 
-#: text.c:202
+#: text.c:205
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "Snelheden testen, dit kan even duren...\n"
 
-#: text.c:207
+#: text.c:210
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "%i bruikbare servers gevonden, de volgende worden gebruikt:\n"
 
 #: text.c:269
 #, c-format
+msgid "Filename too long!\n"
+msgstr ""
+
+#: text.c:281
+#, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "Geen .st bestand, kan niet resumen!\n"
 
-#: text.c:274
+#: text.c:286
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr ".st bestand gevonden maar geen uitvoerbestand. Opnieuw beginnen.\n"
 
-#: text.c:405
+#: text.c:417
 #, c-format
 msgid ""
 "\n"
@@ -191,47 +201,47 @@
 "\n"
 "%s gedownload in %s. (%.2f KB/s)\n"
 
-#: text.c:427
+#: text.c:439
 #, fuzzy, c-format
 msgid "%lld byte"
 msgstr "%i byte"
 
-#: text.c:429
+#: text.c:441
 #, fuzzy, c-format
 msgid "%lld bytes"
 msgstr "%i bytes"
 
-#: text.c:431
+#: text.c:443
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f kilobytes"
 
-#: text.c:433
+#: text.c:445
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f megabytes"
 
-#: text.c:442
+#: text.c:454
 #, c-format
 msgid "%i second"
 msgstr "%i seconde"
 
-#: text.c:444
+#: text.c:456
 #, c-format
 msgid "%i seconds"
 msgstr "%i seconden"
 
-#: text.c:446
+#: text.c:458
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i seconden"
 
-#: text.c:448
+#: text.c:460
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i seconden"
 
-#: text.c:528
+#: text.c:540
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -266,7 +276,7 @@
 "\n"
 "Bugs melden aan lintux at lintux.cx\n"
 
-#: text.c:545
+#: text.c:557
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -301,7 +311,7 @@
 "\n"
 "Bugs melden aan lintux at lintux.cx\n"
 
-#: text.c:566
+#: text.c:578
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel versie %s (%s)\n"

Modified: branches/2.x/ru.po
URL: http://svn.debian.org/wsvn/axel/branches/2.x/ru.po?rev=106&op=diff
==============================================================================
--- branches/2.x/ru.po (original)
+++ branches/2.x/ru.po Mon Apr 27 13:45:53 2009
@@ -2,7 +2,7 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-05 11:15+0530\n"
+"POT-Creation-Date: 2009-04-27 13:21+0530\n"
 "Last-Translator: newhren <colimit at gmail.com>\n"
 "Language-Team: Russian <ru at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -49,35 +49,35 @@
 msgid "Starting download"
 msgstr "Начинаем скачивание"
 
-#: axel.c:241 axel.c:398
+#: axel.c:242 axel.c:401
 #, c-format
 msgid "Connection %i downloading from %s:%i using interface %s"
 msgstr "Соединение %i скачивает с %s:%i через интерфейс %s"
 
-#: axel.c:245 axel.c:407
+#: axel.c:249 axel.c:411
 msgid "pthread error!!!"
 msgstr "ошибка pthread!!!"
 
-#: axel.c:314
+#: axel.c:317
 #, c-format
 msgid "Error on connection %i! Connection closed"
 msgstr "Ошибка в соединении %i! Соединение закрыто"
 
-#: axel.c:328
+#: axel.c:331
 #, c-format
 msgid "Connection %i unexpectedly closed"
 msgstr "Соединение %i неожиданно закрылось"
 
-#: axel.c:332 axel.c:349
+#: axel.c:335 axel.c:352
 #, c-format
 msgid "Connection %i finished"
 msgstr "Соединение %i закончилось"
 
-#: axel.c:361
+#: axel.c:364
 msgid "Write error!"
 msgstr "Ошибка записи!"
 
-#: axel.c:373
+#: axel.c:376
 #, c-format
 msgid "Connection %i timed out"
 msgstr "Время соединения %i вышло"
@@ -142,49 +142,59 @@
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "Невозможно перенаправить stdout в /dev/null.\n"
 
-#: text.c:182
+#: text.c:176
+#, c-format
+msgid "Error when trying to read URL (Too long?).\n"
+msgstr ""
+
+#: text.c:185
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr "URLs длинной больше %d не поддерживаются\n"
 
-#: text.c:187
+#: text.c:190
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "Начинаю скачивание: %s\n"
 
-#: text.c:194
+#: text.c:197
 #, c-format
 msgid "Doing search...\n"
 msgstr "Ищем...\n"
 
-#: text.c:198
+#: text.c:201
 #, c-format
 msgid "File not found\n"
 msgstr "Файл не найден\n"
 
-#: text.c:202
+#: text.c:205
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "Пробуем скорости, это может занять некоторое время...\n"
 
-#: text.c:207
+#: text.c:210
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "Найдено %i полезныÑ
 серверов, будут использованы следующие URLs:\n"
 
 #: text.c:269
 #, c-format
+msgid "Filename too long!\n"
+msgstr ""
+
+#: text.c:281
+#, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "Файл состояния не найден, возобновление невозможно!\n"
 
-#: text.c:274
+#: text.c:286
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr ""
 "Файл состояния найден, но предварительно скачанные данные отсутствуют. "
 "Начинаем заново.\n"
 
-#: text.c:405
+#: text.c:417
 #, c-format
 msgid ""
 "\n"
@@ -193,47 +203,47 @@
 "\n"
 "%s скачано за %s. (%.2f КБ/с)\n"
 
-#: text.c:427
+#: text.c:439
 #, c-format
 msgid "%lld byte"
 msgstr "%lld байт"
 
-#: text.c:429
+#: text.c:441
 #, c-format
 msgid "%lld bytes"
 msgstr "%lld байта(ов)"
 
-#: text.c:431
+#: text.c:443
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f килобайта(ов)"
 
-#: text.c:433
+#: text.c:445
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f мегабайта(ов)"
 
-#: text.c:442
+#: text.c:454
 #, c-format
 msgid "%i second"
 msgstr "%i секунда"
 
-#: text.c:444
+#: text.c:456
 #, c-format
 msgid "%i seconds"
 msgstr "%i секунд(ы)"
 
-#: text.c:446
+#: text.c:458
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i секунд(ы)"
 
-#: text.c:448
+#: text.c:460
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i секунд(ы)"
 
-#: text.c:528
+#: text.c:540
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -268,7 +278,7 @@
 "\n"
 "Об ошибкаÑ
 сообщайте на http://axel.alioth.debian.org/\n"
 
-#: text.c:545
+#: text.c:557
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -303,7 +313,7 @@
 "\n"
 "Об ошибкаÑ
 сообщайте на http://axel.alioth.debian.org/\n"
 
-#: text.c:566
+#: text.c:578
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel, версия %s (%s)\n"

Modified: branches/2.x/text.c
URL: http://svn.debian.org/wsvn/axel/branches/2.x/text.c?rev=106&op=diff
==============================================================================
--- branches/2.x/text.c (original)
+++ branches/2.x/text.c Mon Apr 27 13:45:53 2009
@@ -172,7 +172,10 @@
 	else if( strcmp( argv[optind], "-" ) == 0 )
 	{
 		s = malloc( MAX_STRING );
-		scanf( "%1024[^\n]s", s );
+		if (scanf( "%1024[^\n]s", s) != 1) {
+			fprintf( stderr, _("Error when trying to read URL (Too long?).\n") );
+			return( 1 );
+		}
 	}
 	else
 	{
@@ -259,8 +262,17 @@
 		{
 			if( S_ISDIR( buf.st_mode ) )
 			{
-				strncat( fn, "/", MAX_STRING );
-				strncat( fn, axel->filename, MAX_STRING );
+				size_t fnlen = strlen(fn);
+				size_t axelfnlen = strlen(axel->filename);
+				
+				if (fnlen + 1 + axelfnlen + 1 > MAX_STRING) {
+					fprintf( stderr, _("Filename too long!\n"));
+					return ( 1 );
+				}
+				
+				fn[fnlen] = '/';
+				memcpy(fn+fnlen+1, axel->filename, axelfnlen);
+				fn[fnlen + 1 + axelfnlen] = '\0';
 			}
 		}
 		sprintf( string, "%s.st", fn );

Copied: branches/2.x/zh_CN.po (from r102, branches/2.x/zh_cn.po)
URL: http://svn.debian.org/wsvn/axel/branches/2.x/zh_CN.po?rev=106&op=diff
==============================================================================
--- branches/2.x/zh_cn.po (original)
+++ branches/2.x/zh_CN.po Mon Apr 27 13:45:53 2009
@@ -2,7 +2,7 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-05 11:15+0530\n"
+"POT-Creation-Date: 2009-04-27 13:21+0530\n"
 "PO-Revision-Date: 2008-11-08 22:40+0700\n"
 "Last-Translator: Shuge Lee <shuge.lee at gmail.com>\n"
 "Language-Team: Simplified Chinese <i18n-zh at i18n.org>\n"
@@ -52,35 +52,35 @@
 msgid "Starting download"
 msgstr "开始下载"
 
-#: axel.c:241 axel.c:398
+#: axel.c:242 axel.c:401
 #, c-format
 msgid "Connection %i downloading from %s:%i using interface %s"
 msgstr "连接 %i 从 %s:%i 通过接口 %s 下载"
 
-#: axel.c:245 axel.c:407
+#: axel.c:249 axel.c:411
 msgid "pthread error!!!"
 msgstr "线程错误!!!"
 
-#: axel.c:314
+#: axel.c:317
 #, c-format
 msgid "Error on connection %i! Connection closed"
 msgstr "连接 %i 有错误! 连接中断"
 
-#: axel.c:328
+#: axel.c:331
 #, c-format
 msgid "Connection %i unexpectedly closed"
 msgstr "连接 %i 被异常中断"
 
-#: axel.c:332 axel.c:349
+#: axel.c:335 axel.c:352
 #, c-format
 msgid "Connection %i finished"
 msgstr "连接 %i 结束"
 
-#: axel.c:361
+#: axel.c:364
 msgid "Write error!"
 msgstr "写错误!"
 
-#: axel.c:373
+#: axel.c:376
 #, c-format
 msgid "Connection %i timed out"
 msgstr "连接è¶
æ—¶ %i"
@@ -145,47 +145,57 @@
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "stdout 不能重定向到 /dev/null 。\n"
 
-#: text.c:182
+#: text.c:176
+#, c-format
+msgid "Error when trying to read URL (Too long?).\n"
+msgstr ""
+
+#: text.c:185
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr "不能处理长度è¶
过 %d 的URLs\n"
 
-#: text.c:187
+#: text.c:190
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "初始化下载: %s\n"
 
-#: text.c:194
+#: text.c:197
 #, c-format
 msgid "Doing search...\n"
 msgstr "进行搜索中...\n"
 
-#: text.c:198
+#: text.c:201
 #, c-format
 msgid "File not found\n"
 msgstr "文件找不到\n"
 
-#: text.c:202
+#: text.c:205
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "c测试速度,这可能有点费时……\n"
 
-#: text.c:207
+#: text.c:210
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "%i 可用的服务器没有找到,将使用这些 URLs :\n"
 
 #: text.c:269
 #, c-format
+msgid "Filename too long!\n"
+msgstr ""
+
+#: text.c:281
+#, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "没有状态文件,无法恢复!\n"
 
-#: text.c:274
+#: text.c:286
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr "找到状态文件,但没有已下载数据。重新开始。\n"
 
-#: text.c:405
+#: text.c:417
 #, c-format
 msgid ""
 "\n"
@@ -194,47 +204,47 @@
 "\n"
 "%s 已下载,用时 %s。(%.2f 千字节/秒)\n"
 
-#: text.c:427
+#: text.c:439
 #, fuzzy, c-format
 msgid "%lld byte"
 msgstr "%i 字节"
 
-#: text.c:429
+#: text.c:441
 #, fuzzy, c-format
 msgid "%lld bytes"
 msgstr "%i 字节"
 
-#: text.c:431
+#: text.c:443
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f 千字节"
 
-#: text.c:433
+#: text.c:445
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f å
†å­—节"
 
-#: text.c:442
+#: text.c:454
 #, c-format
 msgid "%i second"
 msgstr "%i 秒"
 
-#: text.c:444
+#: text.c:456
 #, c-format
 msgid "%i seconds"
 msgstr "%i 秒"
 
-#: text.c:446
+#: text.c:458
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i 秒"
 
-#: text.c:448
+#: text.c:460
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i 秒"
 
-#: text.c:528
+#: text.c:540
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -270,7 +280,7 @@
 "请向 shuge.lee at gmail.com 提交翻译错误,请向 http://axel.alioth.debian.org/ 提"
 "交程序漏洞\n"
 
-#: text.c:545
+#: text.c:557
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -306,7 +316,7 @@
 "请向 shuge.lee at gmail.com 提交翻译错误,请向 http://axel.alioth.debian.org/ 提"
 "交程序漏洞\n"
 
-#: text.c:566
+#: text.c:578
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel 版本 %s (%s)\n"




More information about the axel-commits mailing list