aboutsummaryrefslogtreecommitdiff
path: root/libarmep
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2012-10-11 11:18:45 +0800
committerAndy Green <andy.green@linaro.org>2012-10-11 11:18:45 +0800
commitcad6e04faa1b61fe0b904b3241ed4757ffc0645f (patch)
tree8b1dafd30df96efe98cd56687ca53eb42599362d /libarmep
parent6e4ef8e074992fe0d4df9d46a261169cae0e80a3 (diff)
fix colour field length management
Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'libarmep')
-rw-r--r--libarmep/configuration.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libarmep/configuration.c b/libarmep/configuration.c
index 36e07b2..81a391f 100644
--- a/libarmep/configuration.c
+++ b/libarmep/configuration.c
@@ -278,8 +278,8 @@ int configure(struct aep_context *aep_context, struct aep *aep, const char *dev_
ch->supply[sizeof(ch->supply) - 1] = '\0';
break;
case AEPC_FIELD_COLOUR:
- strncpy(ch->colour, marshall, sizeof(ch->supply) - 1);
- ch->colour[sizeof(ch->supply) - 1] = '\0';
+ strncpy(ch->colour, marshall, sizeof(ch->colour) - 1);
+ ch->colour[sizeof(ch->colour) - 1] = '\0';
break;
default:
break;