fledge-iot / fledge

An open source platform for the Industrial Internet of Things, it acts as an edge gateway between sensor devices and cloud storage systems.

Home Page:https://www.lfedge.org/projects/fledge/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get_plugin_info tool SIGSEGV on bad arguments

jchabod opened this issue · comments

In file C/plugins/utils/get_plugin_info.cpp, The application will SIGSEGV in ARGC=2,

Replace

  if (argc<2)

by

  if (argc<3)

Thanks for raising this. I will get this seen fixed.

Note:
As the prgram only work for "plugin_init" function, Isn't ist better to remove second argument and make it hard-coded?

Anyway, this clearly is a very minor fix...

Regards.

A fix for this is now in the develop branch. Also the function has been made an optional argument. This will be released in the next patch release, 2.0.1.

Fixed in PR-#833 and available onwards v2.0.1