Validate and protect powerd option values. Fixes #9061
(cherry picked from commit 3be699295e5cb7be24cc5361700be1a8b759e26c)
Validate and protect powerd option values. Fixes #9061
(cherry picked from commit 3be699295e5cb7be24cc5361700be1a8b759e26c)