Message ID | 1459771860-8584-1-git-send-email-christophe.milard@linaro.org |
---|---|
State | Accepted |
Commit | 3b888f01ca981b2bd253f76ad0e3981f5d8afb4f |
Headers | show |
On 4 April 2016 at 08:11, Christophe Milard <christophe.milard@linaro.org> wrote: > Fixes: https://bugs.linaro.org/show_bug.cgi?id=2149 (CID 159392) > > Signed-off-by: Christophe Milard <christophe.milard@linaro.org> > Reviewed-by: Mike Holmes <mike.holmes@linaro.org> > --- > platform/linux-generic/test/shmem/shmem_linux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/platform/linux-generic/test/shmem/shmem_linux.c > b/platform/linux-generic/test/shmem/shmem_linux.c > index 12266cc..00318b8 100644 > --- a/platform/linux-generic/test/shmem/shmem_linux.c > +++ b/platform/linux-generic/test/shmem/shmem_linux.c > @@ -100,7 +100,7 @@ int main(int argc __attribute__((unused)), char > *argv[]) > test_shared_linux_data_t *addr; > > /* odp app is in the same directory as this file: */ > - strncpy(prg_name, argv[0], PATH_MAX); > + strncpy(prg_name, argv[0], PATH_MAX - 1); > sprintf(odp_name, "%s/%s", dirname(prg_name), ODP_APP_NAME); > > /* start the ODP application: */ > -- > 2.1.4 > > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs "Work should be fun and collaborative, the rest follows"
Merged, Maxim. On 04/04/16 18:04, Mike Holmes wrote: > > > On 4 April 2016 at 08:11, Christophe Milard > <christophe.milard@linaro.org <mailto:christophe.milard@linaro.org>> > wrote: > > Fixes: https://bugs.linaro.org/show_bug.cgi?id=2149 (CID 159392) > > Signed-off-by: Christophe Milard <christophe.milard@linaro.org > <mailto:christophe.milard@linaro.org>> > > > Reviewed-by: Mike Holmes <mike.holmes@linaro.org > <mailto:mike.holmes@linaro.org>> > > --- > platform/linux-generic/test/shmem/shmem_linux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/platform/linux-generic/test/shmem/shmem_linux.c > b/platform/linux-generic/test/shmem/shmem_linux.c > index 12266cc..00318b8 100644 > --- a/platform/linux-generic/test/shmem/shmem_linux.c > +++ b/platform/linux-generic/test/shmem/shmem_linux.c > @@ -100,7 +100,7 @@ int main(int argc __attribute__((unused)), > char *argv[]) > test_shared_linux_data_t *addr; > > /* odp app is in the same directory as this file: */ > - strncpy(prg_name, argv[0], PATH_MAX); > + strncpy(prg_name, argv[0], PATH_MAX - 1); > sprintf(odp_name, "%s/%s", dirname(prg_name), ODP_APP_NAME); > > /* start the ODP application: */ > -- > 2.1.4 > > > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs > "Work should be fun and collaborative, the rest follows" > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/platform/linux-generic/test/shmem/shmem_linux.c b/platform/linux-generic/test/shmem/shmem_linux.c index 12266cc..00318b8 100644 --- a/platform/linux-generic/test/shmem/shmem_linux.c +++ b/platform/linux-generic/test/shmem/shmem_linux.c @@ -100,7 +100,7 @@ int main(int argc __attribute__((unused)), char *argv[]) test_shared_linux_data_t *addr; /* odp app is in the same directory as this file: */ - strncpy(prg_name, argv[0], PATH_MAX); + strncpy(prg_name, argv[0], PATH_MAX - 1); sprintf(odp_name, "%s/%s", dirname(prg_name), ODP_APP_NAME); /* start the ODP application: */
Fixes: https://bugs.linaro.org/show_bug.cgi?id=2149 (CID 159392) Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- platform/linux-generic/test/shmem/shmem_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)