upf_read.c PP_BETA read

Bug #1347513 reported by Alexandr Fonari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Libpspio
Status tracked in Trunk
Trunk
Fix Committed
High
Micael Oliveira

Bug Description

If `PP_BETA` contains less than 4 values in the line code crashes.

```
1.95996148394E-03 -2.26567041800E-04 2.56764564756E-05 -2.86320258506E-06
  3.15304843067E-07 -3.39835879597E-08 3.23718265038E-09 2.43242617962E-10
 -8.17502230631E-10
  </PP_BETA>
```

Attaching a patch to solve this, similar to implementations in the rest of the code

Tags: qe-interface

Related branches

Revision history for this message
Alexandr Fonari (alexandr-fonari) wrote :
tags: added: qe-interface
Changed in libpspio:
assignee: nobody → Micael Oliveira (micaeljtoliveira)
importance: Undecided → High
Revision history for this message
Micael Oliveira (micaeljtoliveira) wrote :

The patch contains an extra modification unrelated to the bug description:

+ if ( (*pspdata)->l_local < 0 ) (*pspdata)->l_local = 0;

For the record, l_local < 0 should be legal, as some codes use it to specify a choice of the local component that is not simply one of the l-components of the pseudopotentials.

Changed in libpspio:
milestone: none → 0.2.0
Changed in libpspio:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.