summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Frolov <froller@froller.net>2012-02-21 15:04:05 +0400
committerAlexander Frolov <froller@froller.net>2012-02-21 15:04:05 +0400
commit45856e02edf4d40dff7e8007cc31378dcccf8211 (patch)
tree490bad5cbe00a8eb3404f3f2ed66fb016ff4c14f /src
parent4fd7ab2ce46794bd18ea125e9c8e2d25d5fe95a7 (diff)
downloadnyancat-45856e02edf4d40dff7e8007cc31378dcccf8211.tar.gz
Fixed SegFault if TERM variable is not set
Diffstat (limited to '')
-rw-r--r--src/nyancat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index 3cbca75..46b201e 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -364,7 +364,8 @@ int main(int argc, char ** argv) {
/* We are running standalone, retrieve the
* terminal type from the environment. */
char * nterm = getenv("TERM");
- strcpy(term, nterm);
+ if (nterm)
+ strcpy(term, nterm);
/* Also get the number of columns */
struct winsize w;
ons'>+1 2011-04-29add sqlite3-dev to build dependssiretart@tauware.de2-2/+4 2011-04-29mention new co-maintainersiretart@tauware.de1-0/+1 2011-04-29add libdbus-1-dev to build dependssiretart@tauware.de2-1/+3 2011-04-29normalize fields with wrap-and-sort(1)siretart@tauware.de2-18/+20 2011-04-29fix order of calling dh_autoreconf_cleansiretart@tauware.de1-1/+1 2011-04-29Add Uploader details to Debian PackageJonathan McCrohan1-0/+1 2011-04-27Bug fix: "script lcd4linux/init.d/lcd4linux missing dependency onReinhard Tartler2-1/+5 2011-04-27No longer build the mpd module. Closes: #578226Reinhard Tartler1-0/+1 2011-04-27No longer compile against Python. Python 2.6 now links against libssl,Reinhard Tartler2-2/+3